Jennifer Lopez and Marc Anthony were married for seven years, and while much of their time together may have been bliss, there were, according to Lopez, problems they simply couldn’t overcome. In a recent interview with Vanity Fair, she said it took her time to realize that sometimes “a person is not good for you, or that that person is not treating you in the right way … I love myself enough to walk away from that now.”

It’s a sentiment that will ring familiar to anyone who’s tried everything possible—couples therapy, date nights, self-delusion—before finally resorting to the painful process of breaking up with their partner. The gut-wrenching agony involved in a breakup is something no amount of money or fame can protect you from. Why does the end of a relationship cause such unique mental anguish?

In our work, we have encountered many extreme reactions to the fallout of romantic relationships. One of the most acute scenarios was witnessed by Levine when he worked in the ER at New York Presbyterian Medical Center as a child-psychiatry resident. There he encountered a teenager who overdosed on pain killers because her boyfriend left her. In another incident, a man whose wife had moved out of their joint home because she suspected he had cheated on her (wrongly, it turned out) rented a suite in a luxury hotel and threatened to kill himself. He had no background of psychiatric illness and was by most accounts a healthy, highly functioning individual. And yet this otherwise well-adjusted person was pushed to the brink of suicide by a breakup.

Many people (ourselves included) initially see this kind of behavior as manipulative or a sign of some underlying disorder. But we had a change of perspective when we came across a vast body of scientific research on adult attachment, the most advanced relationship science to date, spanning 25 years and hundreds of peer-reviewed papers.

The basic premise of adult attachment research—which concerns the way people behave in their closest, most intimate relationships—is that we've been hard-wired to form super-close relationships throughout our lives, and these relationships are essential for our well-being.

When we become attached to our romantic partner, we not only influence one another psychologically, we become, in many ways, a single physiological and biological unit. Our autonomic nervous system, which controls our breathing, sleep, hunger, and heart rate, becomes regulated in many ways by our partner. One study by Brian Baker of the University of Toronto found, for example, that if you have a mild form of high blood pressure, being close to your spouse if you are in a good marriage can actually lower it.

Another study, by James Coan from the University of Virginia, using fMRI technology, found that the brains of married women who were expecting to receive a mild electric shock reacted differently depending on one crucial factor: whether their partner was holding their hand or not. When their partners held their hand, their stress was barely detectable on the scan.

These two research studies powerfully demonstrate the way in which our romantic partner controls aspects of our health and well-being that are outside of our conscious control. So what happens when that unit disintegrates?

It turns out that the devastating pain we feel when we break up is not just emotional in nature. In fact, it closely mirrors the feeling one has when in withdrawal from several drugs. Imaging studies have found that the pain involved in a breakup is registered by the brain as real pain—similar areas of the brain light up after the collapse of a relationship as when we break a leg.

We’ve been programmed by evolution to “protest” when our loved one is unavailable to us. Our protests are aimed at renewing the connection and recovering the feeling of security. (Think of a lost child in a supermarket—the distress and frantic cries are typical "protest behavior.") Protest behavior has evolved in order to ensure that we remain in close proximity to our loved ones. But whereas these behaviors are often labeled as manipulative—suggesting that they come from a higher form of reasoning and planning—we now understand that they are actually instinctual reactions to separation and loss.

Interesting insight into how one starts to heal from such a devastating experience comes from research done by Myron Hofer, M.D., of Columbia University. When rat pups are separated from their mothers, a number of physiological reactions occur: their activity levels, heart rates, and growth-hormone levels all go down. But Hofer's studies also found that specific interventions helped with their separation distress. Feeding the pups, for instance, helped maintain their heart rates at a normal level. Warming them aided in keeping their activity levels intact. And brushing them helped raise their growth-hormone secretions.

But only one intervention alleviated all the symptoms at once, and that was the reunion with their mother.

That is one of the reasons we tend to get back together with former lovers against our better judgment. The fact that doing so can instantaneously alleviate all our discomfort is hard to resist. It also explains the stereotype of the grieving dumpee shoveling through pints of ice cream to soothe their broken heart—as with the rats, it seems to ease some of the pain.

The good news is that although many other mental states are resistant to therapeutic interventions, people heal from relationship breakups remarkably well. By understanding that our attachment needs can be broken down into smaller, more manageable units, we can get through the difficult period intact. Knowing that the pain is as real as a broken limb is an important realization. As is understanding that no matter how bad the pain becomes, greener pastures—and future partners—lie ahead.

Dr. Amir Levine, a psychiatrist and neuroscientist at Columbia University, and Rachel Heller are the authors of Attached: The New Science of Adult Attachment and How It Can Help you Find—and Keep—Love (Tarcher/Penguin).