Ah how does one answer this? well first of all.. Muslims are not allowed to inflict self harm...lets make that clear.
But then there are Shiite Muslims. These amount to 7% of the overall Muslim population. Within this sect... there is a tradition on one particular day of the year to mourn the death of the grand children of Prophet Muhammad, who were murdered by a tyrant king.
And on that day a small minority of the Shiite Muslims will go as far as cutting themselves and beating themselves. Just because the media only captures and shows these people does not mean that all Muslims do the above.
Muslims are not even allowed to drink, smoke or take any kind of substance that may cause themselves harm. Self Harm constitutes to suicide and the punishment for suicide is hellfire.
Hope that answers your question... and Allah knows best.