After a breakup, your mind is probably filled with a jumble of thoughts, everything from "I'll make the best of my regained freedom" to "my life is over." (Sometimes, these thoughts pop-up within the same minute.) There's self-doubt and pain, along with a constant feeling of "this sucks."

Breakups do indeed suck. They suck for the person being dumped, and they suck for the person doing the uncomfortable deed. You've shared a life, dreams, a sense of identity. And the longer a relationship lasted, the harder it usually is to recover.

But taking a more scientific look at breakups — why and how they happen, what brings on the emotions that follow a split, the psychology of missing your ex — may offer an opportunity for self-analysis. It can give you some distance from the experience that often feels painfully specific.

Will your new scientific understanding magically make you feel better? Hardly. But heartbreak, perhaps, can be considered a melting pot of brain chemicals and predictable behaviors, and understanding its ingredients is a reminder than you're not alone in your pain.

Why we break up

Every relationship is unique, and you (or your other half) will have your own reasons for calling it quits. But research suggests that most breakups have one of eight broad causes: a desire for more autonomy, a lack of shared interests or character traits, a lack of support, a lack of openness, a lack of loyalty, a lack of time spent together, a lack of fairness, or a lack of romance. (Interestingly, for women, a desire for autonomy is one of the main reasons for a split.)

Other research has examined the factors that make it harder for couples to break up. Galena K. Rhoades, a psychology professor at the University of Denver who studies relationship commitment, has proposed three types of "constraint commitments," or restrictions that make us more committed to staying in a relationship. Perceived constraints are the interpersonal pressures to stay together. Maybe you're worried about your partner's mental health, for example, or that you'll never find someone else. Material constraints include logistical hurdles to splitting up, like living together, co-owning a pet, or having a vacation already booked. And felt constraints describe the feeling of being trapped or stuck in a relationship.

In her research, Rhoades found that perceived and material constraints were weightier considerations for couples compared to felt constraints. After the fact, it may be helpful to think back about the constraints that were prolonging your own relationship. It's certainly romantic to think that love is what binds a couple together, but it's also not the most realistic perspective, nor is it the most helpful. Acknowledging your constraints can help illuminate the relationship's shortcomings, lessening the sense of loss you may feel.

How we break up

Breakups aren't accidents, and unless infidelity is involved, they're usually not spur-of-the-moment decisions. If you're heartbroken, remind yourself that your partner likely arrived at their conclusion after a substantial amount of time and reflection.

An analysis of individual breakup points, published in the Journal of Social and Personal Relationships, shows just how complex and expansive the process of separation can be. The authors identified 16 steps that occur before the final breakup (see graphic). Though these events don't always happen in this order, it may comfort you to know that the decision probably wasn't easy.

And if your breakup was a messy one, take solace in the fact that most of them are. In a survey from polling firm YouGov, 58% of respondents said that their relationships tend to end dramatically, while only a quarter said their splits are usually civil.

None

Your brain on heartbreak

Heartbreak hurts, and not just in the metaphorical sense.

Experimental research using functional magnetic resonance imaging (fMRI) found that a region of the brain called the anterior cingulate cortex (ACC) activated when participants experienced physical pain, but also when they felt rejected. If you feel like you're going to die after a breakup, know that pain is very real.

That the brain treats rejection like physical pain is a topic of much fascination among scientists. A team at the University of Michigan discovered that when we experience physical pain such as burning, the brain activates its opioid response system, releasing natural painkillers. Astonishingly, the same happens when we feel rejected. (Those with resilient personalities tend to have an advantage because their opioid systems activate more strongly.) The good news: You can boost your brain's natural opioids with exercise and other strategies.

Why does rejection hurt so much in the first place? Human evolutionary research may have an answer. Fending for oneself is hard, so as a species, we've evolved to develop social bonds, and feeling the pain of rejection helps to motivate us to make new connections. The way you're feeling right now is awful, but it does have meaning.

Love is addiction

In the aftermath of a breakup, people can find themselves obsessively focusing on their ex-partners. You may spend more time and energy on trying to see your ex, compulsively check in on them online, and feel like you're losing self-control. You might feel, in other words, like you're addicted to your ex.

The reason for this behavior may lie deep within our brain's circuitry. Addiction studies have found that drug cravings increased levels of the neurotransmitter dopamine in the nucleus accumbens, a part of the brain brain associated with reward — and the same thing happens when we think about or see an ex.

How exactly does this work? When dopamine is released, it interacts with glutamate, another neurotransmitter, to activate the brain's reward-related learning system. It's the same circuit that helps humans learn basic survival skills, like eating. When you're continuously exposed to someone or something that gives you pleasure, your brain learns that it needs this person, object, or substance. That's why seeing a photo of your ex can make you want to call or see them. Fortunately, addictions can be broken.

How long will the misery last?

A friend once told me: "I was with him for five years. Only now, after two years, am I truly happy to be on my own." For her, the famous "dump equation" — the idea that it takes half the length of a relationship to get over it — more or less applied.

This equation certainly sounds nice and tidy. But people are different, and so are relationships. Relying on math to predict the end of your mourning can set you up for failure.

That's not to say that having a "deadline" isn't helpful for some. Perhaps knowing that you are "allowed" five years to get over an ex is an encouraging thought. There's nothing wrong with taking the time to explore your feelings. In fact, rumination after a breakup has been shown to stimulate greater self-transformation. So take the time to understand that the time you spent with your partner wasn't a waste — you are a different person now. You've grown thanks to your relationship.

Tell me what to do already

There's no shortage of advice out there. From bookstores to the internet , the world is filled with how-to advice, personal stories, listicles, and in-depth strategies to get over an ex.

But I'd like to leave you with an interesting approach from a neuroscience study out of the University of Colorado: Practice the placebo effect.

In the study, when people who had recently been through an unexpected breakup were given a "powerful nasal spray to reduce emotional pain," they reported feeling better after seeing an image of their ex. Scans showed that their brains responded differently, too.

The nasal spray was a mixture of water and salt.

So start doing the things you believe will make you feel better, because there's a good chance they will. Go and see the friends you've neglected for a while. Sign up for the acting workshop or the competitive dog grooming classes you've always been interested in. Take a trip. Eat the foods you couldn't order because your partner was allergic. Sleep in the center of the bed. Volunteer your time.

Your brain is incredible. Though it's capable of causing you intense pain, it can also give you relief. It simply takes time.

Anne Freier is the author of "Science of Breakup".