Repeating the word "fuck" actually can reduce your experience of pain, according to a new study by Keele University researchers. The psychologists ran an experiment in which subjects underwent a cold pressor test, a common method to pain threshold and tolerance by immersing your hand in freezing cold water for a minute. (See above video for actor Brian Blessed's demonstration, unrelated to this current research.)
According to the researchers' scientific paper, their data "replicate previous findings that repeating a swear word at a steady pace and volume benefits pain tolerance, extending this finding to pain threshold."
Don't think any old word will help though. They found no benefit when their subjects exclaimed made-up words like "fouch" and "twizpipe."
"Swearing as a Response to Pain: Assessing Hypoalgesic Effects of Novel 'Swear" Words" (Frontiers in Psychology)