We tend to regard pain as an unfortunate by-product of physical harm. Sensations of crushing, burning and piercing are the language of alert, used by our bodies to communicate tissue damage, whether imminent or real. But what about the pain we inflict on ourselves? What about the moment of anguish when we tear at our hair or thrust our fists into the wall? New research suggests that we seek out physical pain to provide an emotional catharsis for feelings of guilt or shame. More important, it suggests that such actions may work.

“Pain may actually be functional in many ways,” explains Brock Bastian, a psychologist at the University of Queensland in Australia. Psychologists working with self-mutilating patients have long suspected this to be true, and leaders in the field describe an intense overlap between emotional and physical pain. But Bastian has demonstrated the first results in a nonpatient population. He asked participants to focus on an episode in their past that made them feel guilty while submerging one hand in a bucket of either freezing or tepid water. Those who had their hands in icy water kept them there for longer and felt less guilt over time. In Bastian’s opinion, guilt motivated them to prolong their exposure to physical pain as a prescription for the psychological pain.

Consider our rituals of apology and religious atonement, and his theory begins to make sense. If you’re looking for a way to wash away your own sins, it may help to turn your shower knob as far as it can go to the right or left. Yes, it will hurt, but that’s the point.