Stimulus Overload
From Rest of What I Know
Stimulus Overload is the idea that you can overload your nerves with some sort of stimulus so that you no longer feel some other unpleasant sensation.
The first time I consciously tried this out was when I got an allergic reaction and decided that I should apply a lot of scalding water to my skin.
When I mentioned this to my dad, a surgeon, he mentioned Gate Control Theory as a possible mechanism. I suppose people have already thought of this in much detail!