I think flagellation and scourging applies specifically to whipping. I'm not sure if there is a specific term that encompasses all of these practices.
Those who do so are often referred to as Fakirs
http://en.wikipedia.org/wiki/Faqir subtly different to Sadhus
http://en.wikipedia.org/wiki/Sadhu who practice extreme self denial or asceticism
http://en.wikipedia.org/wiki/Ascetics.
I did see an interesting program following a group of young Science students touring around India. A lot of people there tend to go to these sort of Holy men for a cure if they get bitten by a snake. The scientists were trying to get people to go to hospitals instead. They found that the best way to do this was to demonstrate that they too could stick needles in themselves, walk over hot coals and lie on beds of nails.
Certainly my old Karate instructor used to do the bed of nails trick having a cinder block broken on his chest with a sledge hammer- and there was certainly nothing holy or spiritual about him!