Shopping can improve a bad mood temporarily, but the guilt that follows a big spending spree is often worse. There are some tricks you can use to stave off the urge to splurge

There’s no buzz quite like the one that comes with an impulse purchase.

Shopping can indeed improve a bad mood, a study published in the journal of Psychology and Marketing showed, and can also give us a mental buzz similar to the high that drug users may experience. In fact, in a 2016 ebates.com survey of over 1,000 American adults, 96% said they had bought something to make themselves feel better.

But the perceived benefits of retail therapy are often fleeting and can give way to longer-term and morale-damaging side effects.

Negative emotions and sadness can lead to a loss of self worth and this often is what propels people to turn to shopping when they feel down. The drawback: those same negative emotions can come back with a vengeance, along with remose and guilt, if we spend more that we should or had planned to.

But there may be some ways to experience the rush of an impulse buy without getting out the credit card, and without an ensuing downward spiral in mood.

Unpicking the behavior

“What we’re doing with retail therapy, is we’re trying desperately to regulate our emotions,” says Joanne Corrigan, a Sydney-based clinical psychologist specializing in compassion focused therapy – a type of psychotherapy aimed at helping people with mental-health issues related to shame and self criticism. “We don’t like distressing or uncomfortable emotions. So we’ll do short-lived things that make us feel good in the moment.”

When we feel down or anxious, our aptitude for self-control is diminished, making us more prone to making bad decisions. Sadness, it seems, leads to more impatient thoughts, and a desire for immediate reward at the expense of greater future gains.

This phenomenon was termed ‘myopic misery’ by Jennifer Lerner, professor of psychology at Harvard University and her colleagues Ye Li and Elke Weber of Columbia University in their research paper on the issue. 

What we’re doing with retail therapy, is we’re trying desperately to regulate our emotions

If we can understand why we want to buy things when we are feeling down, and why purchasing makes us feel good, could we trick our brains into triggering posive feelings without having to spend?

Corrigan says yes. If we can motivate our “compassionate brain” – the part that calms feelings of anxiety – then we don’t have to impulsively seek out those short-term boosts of pleasure.

“The anxious and driven part of the brain flushes your system with neurochemicals like adrenaline and cortisol and dopamine, but you can calm them down by activating the soothing and affiliating part of the brain that releases endorphins and oxytocin, and that will give you a different reaction to the world,” she says.

According to Cornell University economist Robert Frank, the key to combatting the impulse to shop when we feel down is self-control.

He points to the work of Walter Mischel, who conducted the Stanford Marshmallow test, an 1960s experiment in child psychology and delayed gratification, which sought to examine self-control among children by offering children a choice between one small reward provided immediately or two small rewards if they waited for a short period.

Follow-up studies found that children who were willing to wait longer for rewards tended to have better scores in later life when it came to measurements including SAT scores, educational attainment and body mass index (BMI).

For a lasting sense of wellbeing, we need to override the impulse for immediate gratification, Frank says.

“You ought to take a longer view of what counts, but that’s where people have consistent difficulty: giving sufficient weight to things that occur not now but in the future.”

Using your toolkit

Impulsivity makes reflective, logical action, and self-control difficult for most people. Although Corrigan says we have what we need to control those impulses.

Our brains are equipped with what we need to feel content and happy if we focus on feelings of gratitude and compassion, she says, without having to resort to buying anything.

David DeSteno, a professor of psychology at Northeastern University in Boston, has spent decades researching the effects that positive emotions have on decision making and his research suggests that simply feeling grateful can change how we act.

In his Social Emotions Lab, DeSteno offered participants the choice between being given $30 immediately or $70 in three weeks’ time. When people were primed with feelings of gratitude, they were able to override the desire for instant gratification and chose the latter option.

When you feel grateful, not only does it help you resist the urge to make an impulse buy, but it also makes you feel good in the same way that buying something would

Another kind of buzz

When DeSteno followed people for weeks at a time, those who experienced gratitude regularly were more able to resist impulse purchases and had a greater level of self-control.

“When you feel grateful, not only does it help you resist the urge to make an impulse buy, but it also makes you feel good in the same way that buying something would. So it’s a pleasurable experience that also makes you value the future and have greater self-control,” he says.

It can be as simple as thinking about something you feel grateful for no matter how small it is, he says.

Focusing on the same few things again and again, he adds, means they will lose their power of influence. Instead he advises regularly taking “time to think about small things that happen to you: someone who let you go in front of them in line, someone who gave you any kind of kindness.”

Helping others, such as going out of your way to help a colleague at work, sets up a reinforcing cycle of gratitude, he says.

Paying it forward

If the act of buying something is still too strong to avoid, altruistic spending can have its benefits.

Elizabeth Dunn, a professor of psychology at the University of British Columbia studies the links betweenhappiness and money.

She conducted a study in Canada and Uganda, giving people a small sum of moneyand asking half of the group to spend it on themselves, while the others were asked to spend it on someone else.

Those who bought for someone else had a long-lasting feeling of wellbeing, the study showed, compared with those who spent on themselves.

“People felt significantly happier when they looked back and reflected on a time when they spent money on others, rather than themselves,” she said at a recent TEDx talk.

So the next time you feel the urge for an impulse purchase, think about something you feel grateful for; if that fails, consider buying for someone else instead.

The lasting benefits of those actions could be a step towards better self-control.

‘The more often you feel grateful in your daily life,” says DeSteno, “the more prepared you are to be able to have greater control to resist these temptations when they arise.”

If you liked this story, sign up for the weekly bbc.com features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Culture, Capital and Travel, delivered to your inbox every Friday.

To comment on this story or anything else you have seen on BBC Capital, please head over to our Facebook page or message us on Twitter.