The sting of being dumped isn't easy to shake off.

But we have good news for all you lonely hearts out there: You can dupe your brain into "feeling less pain," according to new research from the University of Colorado Boulder. It turns out that heartbroken men and women experience an uplifting neurological and behavioral "placebo effect" when they believe they're doing something—anything—that can ease the torment of a breakup.

In the study, published in the Journal of Neuroscience, researchers asked 40 volunteers who had been dumped in the previous six months to bring in a photo of their ex, as well as a photo of a close friend who was the same sex as the participants. While inside a functional MRI machine, the participants were shown images of their exes, then asked to recall the breakup. After, they were shown images of their same-sex pal. (If you thought that was harsh, they were also subjected to a hot stimulus to their left forearm.)

These painful emotional and physical stimuli were alternately repeated, and subjects ranked how they felt on a scale from 1 (very bad) to 5 (very good) as the MRI whirred on, tracking their brain activity. Then, subjects got out of the machine and received a nasal spray. Half were told it was a "powerful analgesic effective in reducing emotional pain," while the other half were told the truth—the spray was just a simple saline solution. 

Subjects then went back inside the machine and suffered another round of emotional and physical torment. The regions that lit up during physical and emotional pain were similar (so your heartache post-breakup is a real, legitimate pain). The big difference? The placebo group not only felt better emotionally and said they experienced less physical pain, but their brains responded differently to images of their exes thereafter.

After the "pain-reducing analgesic"—which, again, was just a placebo—the subjects' brains worked overtime to control emotion, and throttled back on areas associated with rejection. Their brains also cranked out more pain-numbing chemicals (opioids) and feel-good neurotransmitters (dopamine) in the midbrain. Positive expectations triggered a feel-good chain reaction.

"Breaking up with a partner is one of the most emotionally negative experiences a person can have, and it can be an important trigger for developing psychological problems," study author Leonie Koban said in a press release, adding social pain is linked with a 20-fold higher risk of developing depression in the following year. "In our study, we found that a placebo can have quite strong effects on reducing the intensity of social pain."

These new findings offer actionable advice for anyone suffering a particularly harrowing breakup. If you think going out for a long run, trying a new workout class with your buddies, or learning a new skill you've been dying to try (like surfing or any other fat-burning water sport) will have an uplifting effect on your mood, there's a good chance it will.

"Just the fact that you're doing something for yourself and engaging in something that gives you hope may have an impact," lead study author Tor Wager says. "What is becoming more and more clear is that expectations and predictions have a very strong influence on basic experiences, on how we feel and what we perceive," Kor adds.