What is the ruling on self-sacrifice in mourning in the Shiite religion?

Self-immolation is forbidden in Shiites

It seems that the Shiite religion forbids harming oneself during mourning, and does not allow Muslims to harm the body, except for defense.In the history book of Tabari, it is stated that on the night of Ashura, Imam Hussein recited poems next to the tent, which was a sign of his martyrdom the next day.
Hazrat Zainab (Imam Hussein’s sister) heard her voice, immediately cried out, and slapped her on the face, and fainted. The Imam advised her after she had recovered, and ordered her to wait for God, and He swore to God that, after his martyrdom, he would not tear his shirt and not injure his face. Now the question is, how does the Imam give such an order to his sister at that time, but the Shiites are allowed to do so after 1400 years? In the mourning of the Imam, they should harm themselves in this way.