I don't think that's an uncommon reaction, and it might not be a useless one either: A study to be published next month explores the impact of swearing on pain tolerance. In the experiment, undergraduate students were asked to submerge their hands in icy water (the only type of pain tested) and either swear or use non-profane words. The blog Neurophilosophy has more:
The researchers measured how long the participants kept their hands submerged in cold water, and asked them to rate the amount of pain they felt. Their heart rates were also recorded after they had submerged their hands in room temperature water as well as after the submersion in cold water. Contrary to their hypothesis, they found that swearing actually reduced the amount of pain felt. The participants kept their hands submerged in the cold water longer for longer, and also reported experiencing less pain, when they repeated a swear word than when they repeated a word describing a table. Swearing was also associated with increased heart rate.It's uncertain whether this would apply to other types of pain, or if the severity of the word increases its effectiveness (bonus points for creative combos?) but next time you stub your toe or get a papercut try it out. It couldn't hurt.