Allaah says in Qur'an: “And do not kill yourselves. Verily Allaah is All-Merciful to you.” [Surah An-Nisaa: 29]
And He says: “And do not throw yourselves into destruction with your own hands.” [Surah Al-Baqarah: 195]
I can understand that the Shi'ites are mourning. However, this practice of harming oneself through chest beating to the point of bleeding excessively (Matam) and striking oneself with sword (Tatbir) seems to be something excessive and extreme that is prohibited in the light of above mentioned verses. You can see graphic images of these events all over the internet which I do not want to link here.
Moreover, the Grand Ayatollahs seem to endorse it as a desirable deed. There are news of Shia scholars favoring tatbir. However, I am not sure of its authenticity. Here are videos of some shia scholars endorsing tatbir (one even calling it wajib). How do Shi'ites justify this act when it contradicts the verses of Qur'an?