Anyone who's ever been dumped will know that it not only feels like someone's punched you right in the heart, it also makes you seriously crazy. It's the kind of pain that drives you to send 28 text messages to your ex in 15 minutes, drink tequila on a week-night, and quit your job, because "nothing matters if I don't have someone to share it with".

The (sort-of) good news is that it's not just you, there's actually a scientific reason for why you make such terrible choices right after a breakup, and it's all to do with the hormones that are coursing through your system during this emotional time. Ironically, these are the very same hormones that make you so insanely happy while you're falling in love. 

So how does losing the love of your life change the chemical composition of your brain? First of all, let's make it clear that heartbreak really does hurt. Functional MRI scans have shown that people who have recently been dumped have higher than normal activity in the region of the brain that registers physical pain.

This triggers the release of stress hormones such as cortisol and adrenalin, leading to all kinds of physical symptoms, such as nausea, difficulty breathing, and also a weakening of the heart muscle that doctors call Takotsubo cardiomyopathy, and can sometimes be fatal.

But let's get back to our brains, because those stress hormones aren't the only ones flooding our systems. Back in 2010, researchers from Rutgers University in New Jersey asked 10 women and five men who'd recently been dumped, but were still "intensely in love", to get inside an MRI machine and look at photos of their ex. That literally sounds like the worst kind of torture you could put someone who's dealing with a breakup through, but it provided some fascinating insight into the neuroscience of being dumped (thank you, heartbroken warriors of science).

In fact, the scans showed that their brain activity was very similar to that of an addict going through cocaine withdrawals. And that's because falling in love is a lot like becoming hooked on drugs - when you're smitten with someone, it activates the 'reward' neurons in your brain, and this triggers the release of the feel-good hormone dopamine.

But the thing about dopamine is that it always leaves your brain wanting more, which explains that new-love feeling of obsession where you literally can't be without the other person (you hang up first, no, you hang up first). Our brains eventually fall into a more stable pattern when we're in a relationship, but they still expect to get their dopamine boost from being around your loved one. And when that person suddenly gets ripped away from you, it leaves your brain scrambling for its next hit. The result is very similar to that obsessive new-love phase, but gone terribly wrong.

"The brain's reward systems are still expecting their romantic 'fix', but they're not getting the responses they expect," Diane Kelly writes for io9. "And like someone in the depths of a drug addiction, they turn up the volume in an effort to get you to respond."

Because the reward system is one of the most primal regions of our brain, it also happens to bypass our conscious 'filter', just like the feeling of being hungry or thirsty, which is why we end up doing such crazy stuff to boost our dopamine. 

Binge-eating works temporarily, so does staring at photos of your ex, but at the end of the day, your brain is going to need to rewire itself to get over it. And according to research published earlier this year, that takes on average three months.

On the plus side, scientists have also found that your brain is hard-wired to move on. "Our review of the literature suggests we have a mechanism in our brains designed by natural selection to pull us through a very tumultuous time in our lives," criminologist Brian Boutwell from Saint Louis University said in a press release earlier this year. "It suggests people will recover; the pain will go away with time. There will be a light at the end of the tunnel."

In the meantime, paracetamol has been shown to help with the physical ache, as does social support. And, believe it or not, talking through the problem actually does help you move on faster

So don't feel too bad about going a little crazy while you're still reeling from the pain of rejection - you can't fight biology.

Check out this episode of AsapSCIENCE to find out more about the science of heartbreak: