Photo: Scott Everett White/The CW

Crazy Ex-Girlfriend has, so far, been a story of extreme romantic obsession: At the start of the series, Rebecca Bunch is deeply unhappy at her Manhattan law firm when she runs into Josh Chan, her old summer-camp boyfriend. Josh mentions that he is leaving the city to head back to his small California hometown, and soon afterward — despite knowing absolutely no one there but Josh — Rebecca decides to follow.

This action, and those that have followed, are indeed — to use the parlance of the show — crazy: over-the-top, obsessive, and often straightforwardly creepy. But Rebecca’s behavior is also a pretty spot-on example of the uniquely fierce psychological pull of unrequited love. This is, of course, nothing new, exactly — the poets have been examining this for centuries. Consider the words of George Bernard Shaw, who once wrote that love is “the most violent, most insane, most delusive” of human emotions. Or, more recently, consider the story of Lisa Nowak, the former astronaut who drove 900 miles from Houston to Orlando in an alleged attempt to kidnap the woman her ex had started seeing.

The psychology here is not complicated: Rejection hurts. But the degree to which it pains us is stronger than you might think, and it even applies in situations in which people are rejected from something that is objectively kind of dumb. Many recent studies on the subject of rejection and social pain have centered on the computer game Cyberball, in which three participants pass a ball back and forth for a time. The trick here is that only one of the three participants is manned by a human; the other two are programmed to slowly but steadily begin leaving the real person out, until they are just passing the ball between themselves. (This game, by the way, grew out of a real experience: In the early 2000s, a Purdue University psychologist designed Cyberball after being excluded by a game of Frisbee at a park.)

Who would care about being left out of a game of computerized hot potato? Actually, you probably would, the evidence suggests: After being ostracized in Cyberball, people report more negative moods, as well as decreases in their sense of belonging and self-esteem as compared to those who played the game but were not ostracized.

Additionally, an often-cited brain-imaging finding has suggested that the social pain that comes from exclusion activates the same neural pathways as physical pain, which has led some researchers to experiment with actual painkillers, like Tylenol, for treating heartache. The neuroscience here is shaky, as a meta-analysis published in 2013 questioned the “social pain is the same as physical pain” hypothesis. But anyone who has ever experienced unrequited love or romantic rejection knows the overwhelming nature of the feeling. To my mind, the most interesting parts of one recent brain-imaging study (quoted here) have little to do with the imaging technology at all. I’m drawn instead to the words of the heartbroken themselves: “It hurts so much. I crumble. I just start crying.” “I hate what he did to me, but I still love him.” “I kept thinking, I love you, I hate you; how could you do this?” On average, the participants estimated that they thought of the object of their heartache for more than 85 percent of their waking hours.

On the show, this notion has mostly been played for laughs, but in recent episodes, Rebecca’s behavior has turned increasingly inappropriate: As the show has gone on, she’s both broken into Josh’s house and allowed a staged break-in at her own home; she’s maneuvered her way into his family by regularly including herself at get-togethers, including his mother’s book club; and she’s DIY’d an unsettling amount of Josh-themed things, including an “I [Heart] Josh” thong and a truly terrifying teddy bear with a printout of Josh’s mug taped over the bear’s face. At a certain point, one-sided love isn’t fun anymore.

In 2013, a quartet of philosophers at the University of Oxford argued that the ethical choice for modern neuroscience is indeed to create interventions for those struggling with obsessive unrequited love. A broken heart is pain just like a broken limb — except that a broken heart can spark some “downright dangerous” actions. “It may bind a spouse to her domestic abuser, draw an unscrupulous adult toward sexual involvement with a child, put someone under the insidious spell of a cult leader, and even inspire jealousy-fueled homicide,” they write.

But Crazy Ex-Girlfriend seems to be taking a turn, with Rebecca realizing that her obsession with Josh is only tangentially about Josh himself. This, and so much of the show, rings true for author Lisa A. Phillips, a journalist whose book Unrequited: The Thinking Woman’s Guide to Romantic Obsession, was published in paperback earlier this year. In a way, she is almost a real-life Rebecca Bunch: Around the time she turned 30, she fell hard for a man who didn’t feel the same way. At one point, she broke into his apartment building, frightening the guy so much that he picked up a baseball bat for protection while dialing 911. Her book includes perspectives from history, poetry, science, and philosophy, along with interviews of more than 200 women who have suffered from obsessive unrequited love.

Her research, coupled with her own personal experience, is perhaps what makes her able to see both perspectives concerning the debate over the pathologizing of unrequited love. “I do think that it’s really important that if you’re suffering greatly and you can’t move on, you need to be treated [by a mental health professional],” she told Science of Us. “But so often, obsessions, and in particular, romantic obsessions, are signals to deeper things in our lives.

“If you can you can ask yourself, ‘What is this person about? What does this person represent? What am I really chasing? What are the thoughts and ideas around this fixation?’, you can get some really valuable information about yourself,” Phillips said. Even the act of posing the questions to yourself can help, in that it shifts the focus off of the other person and onto you, and your life, and what deserves more attention.

If you are a television character, you can do this with the help of a dream ghost therapist. If you are a real live person, on the other hand, a real live therapist may be crucial. Either way, of the show, Phillips said, “It’s over-the-top, because there’s song and dance and magical realism. But, I don’t know — a lot of it doesn’t seem that far-fetched to me.”