Your long-term boyfriend just announced that he’s met someone else. In the days following the breakup, you try to expedite the process of moving on by going out with friends, flirting with strangers and keeping the ever-present thoughts of your ex to yourself. But really, all you feel like doing is getting your best friend on the phone to rehash the dirty details of the breakup yet again. Or, if she’s not available to talk, curling up on the couch with a bottle of wine and putting Adele’s “Someone Like You” on repeat.QUIZ: Do You Get Too Attached?While we tend to think that distracting ourselves from our feelings is the best remedy for mending a broken heart, it’s not always possible to turn off our brain’s onslaught of reflective programming. Nor, according to some research, is it necessarily the only way to feel better. Indeed, surrendering to the temptation to wallow in our feelings may be the first step on the road to recovery.Losing the person we love (to death, or another woman), personal traumas and national tragedies can change our lives by shaking our beliefs in how the world works and altering our vision of others and of ourselves. After an upsetting experience, 90 percent of people report spending significant time ruminating about it, says Bernard Rimé, a professor emeritus of psychology at the University of Louvain in Belgium. We search for meaning, answers, explanations.“One of [our brain’s] most important skills is a hyper-sensitivity to incomprehension, inconsistency, incoherence or contradiction,” Rimé says. “A major negative event represents a real set of inconsistencies.”Chan Jean Lee, an assistant professor of marketing at the Korea Advanced Institute of Science and Technology in Seoul, who has studied how people act under emotional distress, believes that wallowing is a coping method that helps people get over their sadness gradually.MORE: How Clothes Affect Your MoodYour iPod Can Be Your Best Friend“After a negative episode, our first reaction is a feeling of loneliness followed by a need to be in touch with our loved ones,” says Rimé. “Humans are built this way.” The more intense the sadness, the more you want to unload to your friends and the longer it takes you to talk it all out.But even the most patient of friends can only spend so much time lending a supportive shoulder. Luckily, emotional proxies for understanding friends are available. In a 2013 paper published in the Journal of Consumer Research, Lee investigated how negative feelings impact our preference for what researchers call mood-congruent aesthetic stimuli. In other words, when we’re sad, do we prefer sad books, movies and songs?Lee and her colleagues addressed this question by asking 233 participants to read through 12 negative scenarios, like breaking up with a significant other, finding an insect in their food or failing an exam. Half the participants then chose whether they would like to talk to either a funny friend who could distract them from the negative scenario, or an empathetic friend who could share their feelings. The other half chose whether they’d like to listen to a cheerful or sad song following the event.MORE: Your Mind on MusicIn situations that dealt with interpersonal loss, the researchers found that people strongly preferred to speak with an empathetic friend or to listen to sad, mood-congruent music. Lee thinks the same would hold true of sad books, tear-jerking movies or moving works of art.MORE: RomCom Lessons to UnlearnWhen friends are not around or are tired of talking about your breakup, cranking up a sad-song playlist might provide you with an equivalent sense of emotional sharing. This is not to say that songs or books should replace friends, however. “Being granted material, emotional and information support by them is essential to us,” Rimé says.Timing Is EverythingBut just because people are inclined to stew in sadness doesn’t mean it’s always a good idea. Ruminating too much on negative thoughts, researchers have found, is associated with higher rates of anxiety and depression. “Severe adverse events tend to invade the mental life of the person,” Rimé says. “A vicious cycle can easily develop.”Timing may be key for walking the fine line between productive reflection and dangerous dwelling. Researchers writing in the journal Cognitive Therapy and Research found that those who fixated on their sorry circumstances as well as those who only distracted themselves from their problems did not cope well on the long term. Instead, people who first distracted themselves from their negative feelings and then later addressed those feelings directly tended to cope best and also come up with superior solutions for their problems.MORE: Breakup Tips from the ExpertIn real life, this may mean you can best get over an ex by hitting the bar or dance club with friends immediately following the breakup, and giving the situation a good hard think after you’ve had some time to cool off. It may be the safest way to avoid getting stuck in a state of perpetual wallowing—while still giving yourself a chance to indulge in some much-needed unburdening, trash talk and sappy music sing-alongs.