Nothing in the Shari`ah prohibits sadness for the death of dear people; it is an innate feeling. However, one should demonstrate such sadness without violating the rules of Islam. For example, slapping the face, tearing clothes, slashing the back and hitting the head with swords are all forbidden acts. If one does so, then he is harming himself, and in Islam one is not allowed to even expose himself to harm or ruin. If people do such deeds to show sympathy for imam Al-Hussein (may Allah be pleased with him), then they should rather show it by spreading justice, as Al-Hussein sought to do.

Thus, these Shiite customs done to mourn imam Al-Hussein (may Allah be pleased with him) have no Islamic basis, not even in the Shiite jurisprudence itself. Such acts are no more than individual practices that developed into regular customs of millions of people with the elapse of time so that anyone who acts against them is resented. However, most contemporary Shiite scholars prohibit such acts and practices and consider them a type of backwardness.
Responding to your question, Sheikh Muhammad HussainFadlullah, a major Shiite scholar in Lebanon, states the following:

There is a common denominator between the rites of celebration on the tenth of Muharram in the past and in the present time. It is mainly to condole the death of imam Al-Hussein (may Allah be pleased with him). In the past, people used to strike their cheeks as an expression of sorrow, but not in an excessive way as people do at present.
nowadays, people observe some excessive habits such as hitting their heads with swords and slashing their backs with iron chains.
Such extreme customs did not emerge as a result of legal collective ijtihad based on the Shari`ah. Rather, they emerged out of individual innovation that turned into ritual acts that so excited people’s sympathy that they imitated them blindly until they became sacred customs that none can ignore; otherwise one would be considered negligent and extremist. The issue reached the extreme that even reverent scholars do not dare to stand in the face of the majority to dissuade the
m from such extremism, because whoever tries to do so will be accused of hating the Prophet’s household and trying to erase their tracks and erase them from people’s memory.
Some people may argue that some great scholars in the field of Shari`ah, 50 and 60 years ago, issued fatwas legalizing the Shiite rites on that occasion. They said that such rites are not originally prohibited unless they lead to ruining oneself.
Concerning the reason for issuing those fatwas, they were raised in a juristic seminar on “Is It Prohibited for Man to Harm Himself? What about Slight Harms?” This means, for instance, injuring one’s hand, hitting the head, and the like which does not lead to man’s ruin. Is the harm itself prohibited or what is unlawful is the harm that leads to destroying oneself or jeopardizing one’s heath?
there are two views on this case:
the first view indicates that harming oneself is intrinsically forbidden, unless there is an urgent need for it, such as the dangers man faces in his travels or working day and night to attain material and spiritual gains. There must be a prior estimation of the benefit or loss entailed by subjecting oneself to harm. If the benefit expected from tiring oneself deserves the harm borne in its cause, then benefit is given priority over harm in such a case. That is, one disregards the harm he would do himself for the benefit he would attain. Hence, those who hold this view see that it is prohibited for man to harm himself, even in mourning or expressing love, et cetera.
there is another view adopted by many scholars. They maintain that man is not prohibited to harm himself if such harm would not lead him to a bad state of health or to death.
In light of this view, scholars see that hitting the head with a sword and striking the cheeks in mourning are not forbidden acts in themselves. Rather, they are forbidden because man is forbidden to do anything that may lead to his ruin.
Scholars who legalize harming oneself in principle hold some restrictions. They see that the issue in question is prohibited in certain cases if it leads to something prohibited in the second place.
the above view is also maintained by the late major Shiite scholar Sheikh As-SayedAbul-Qasim Al-Khaw`ie.
As for my own opinion regarding this issue, I consider such acts and practices as forbidden. This stems from the well-established fact that hurting oneself is forbidden as far as the Islamic Shari`ah is concerned unless there is a necessity for that. Thereupon, it is forbidden to strike heads with swords, or backs with chains, or even to harshly strike one’s cheeks that may hurt him even slightly. This can be deducted from the aforementioned texts that prove that harming one’s self is forbidden.
In addition, rational thinking requires this, as people reject the idea of anyone doing any sort of harm to himself. All these support my opinion that such acts are forbidden in Islam even if they are done in the name of sadness and mourning.
I have another observation in this regard, that those who strike their heads with swords or backs with lashes claim that they do this to express sympathy with imam Al-Hussein (may Allah be pleased with him) in his pains and with Zainab (may Allah be pleased with her) and her sisters when she was scourged. But, I would say that expressing sympathy does not require one to be injured in the same way as imam Al-Hussein or to be scourged in the same way as Zainab.
truly, Al-Hussein was injured while he was striving in Allah’s Cause. So, those who express sympathy with imam Al-Hussein are only those Palestinian young men who fight against the Israeli enemy. They are indeed injured in a similar stance as that of imam Al-Hussein’s. Also, those who show sympathy with Zainab are none but those who suffer from whipping in the vaults of the Israeli prisons. This is because she was scourged in the way of an “issue”.
Based on all the aforementioned, I find it necessary to wipe out these customs, for they are forbidden due to the many negative effects they have on the individual level and on the level of the image of the Shiite Muslims all over the world. That’s why I said earlier that they are some sort of backwardness.