Lucas Ottone / Stocksy

Intrusive thoughts can be distracting and upsetting. Here's how to control them.

When I was going through my last breakup, I was constantly plagued by intrusive thoughts — unwanted, often upsetting thoughts that invade our minds, often during the most inconvenient times. During my breakup, for example, my days were interrupted by thoughts like, What was she doing? Who was she with? What was she thinking? My brain would get stuck in what felt like an inescapable labyrinth. I found myself playing Words With Friends and working out obsessively, just to be doing something that wasn’t thinking about her. I eventually found my way out of the maze, but it may have been a lot less torturous if I’d had some tools to cope.

While my situation was linked to trauma and anxiety, intrusive thoughts are pretty common and don’t usually interfere with daily life, says says Curtis Reisinger, an NYC-based psychologist and assistant professor at Donald and Barbara Zucker School of Medicine at Hofstra University. Still, they can be very difficult to escape. “Intrusive thoughts seem to focus on one’s internal reaction to them which sometimes is almost ‘magnetic’ in a slippery slope kind of way,” he says. My cyclical thoughts about my ex definitely made me feel like I was being pulled along by an imaginary force — a magnet of sorts.

This is what's happening in your brain when an intrusive thought digs in: “The nervous system is basically the body‘s communication system,” explains Aimee Daramus, a Chicago-based clinical psychologist. Cells (called neurons) pass messages to each other by activating electric signals that trigger the release of chemicals called neurotransmitters. Neurotransmitters pass information from one cell to the next and trigger changes in the brain and body, she explains.

Stay with me here: The more a neural pathway is used the stronger it becomes. Intrusive thoughts are the product; they're effectively messages triggered in the nervous system, usually by anxiety or trauma. The good news is, even though intrusive thoughts feel magnetic, because they are real physiological events, there are concrete things we can do to get "unstuck." Here are a few:

Engage your mind

“Physical exercise, including activities such as yoga are good methods to shift one’s thoughts away from intrusive thoughts. The attention needed to focus on these activities are a captures the attention otherwise consumed by intrusive thought processes,” says Reisinger. Daramus adds, “Music can also help. There’s a style of music meditation in which you focus all of your attention on only one instrument. Each of these can work because they direct your attention away from the thoughts and toward something else.” If yoga, exercise, or music meditation aren’t your cup of tea, you can also play games on your phone, says Daramus, but she quickly notes that watching TV probably won’t be effective. “Passive activity like watching TV doesn’t seem to work as well as something active, like gaming,” she says.

Per Swantesson / Stocksy

The important thing is to do something that requires your full attention and engagement. Reisinger suggested that any activity that “gets your mind off things” will do.

I wondered if those old habit-changing actions — such as snapping yourself with a rubber band — would help. “Thought stopping aversive techniques, such as snapping your wrist with a rubber band every time you have a thought works only for the short term. When you stop snapping yourself, the thoughts seem to come back,” he says. So forget about the low grade masochism, you’re probably already in emotional pain.

Try “adaptive thinking”

If you’ve ever gotten the advice to replace a negative thought with a positive one, a.k.a. using affirmations, you probably already suspect that it’s mostly bullshit. “Trying to suppress, or not think about intrusive thoughts does not work and may make the situation worse,” says Reisinger.

If you try to pull the wool over your own eyes, it’s just not going to work, says Kahina A. Louis, a Florida-based psychologist. Instead, she suggests trying to replace negative intrusive thoughts with slightly more reasonable, but believable thoughts — these are called “adaptive thoughts.” “For example, if the intrusive negative thought is something like ‘I always fail,’ a more adaptive thought would be, ‘Yes, I have failed at some things, but there are also things that I have succeeded at, like making it through that difficult class that time or getting this job I have,’” Louis says. “You can replace your thoughts with something true to you that you can actually believe.” In other words, don’t lie to yourself; it won’t work. And if you’re already struggling, you really want to develop self-trust.

Develop a mindfulness practice

All of the experts I spoke with agreed that it’s important to develop tolerance to negative thoughts. They’re just a fact of life. Meditation is an age old technique for dealing with troublesome thinking. “Mindfulness meditation training may be helpful in teaching individuals to develop reliable techniques of observing and accepting intrusive thoughts without a need to react and be strained by them,” says Reisinger. Daramus agrees. “Mindful meditation works for a lot of people,” she says, “You focus your attention on your breath and let the intrusive thoughts pass by. You can also use a “safe space” meditation, in which you imagine yourself someplace perfectly safe.” Pick one kind of meditation technique and stick with it, Daramus says, “you have to practice repeatedly to strengthen the neural pathways involved in using your new coping skill.”

It turns out that some of the things I was doing, playing games on my phone, meditating, and exercising, were actually helping me. Getting out of your own mind maze doesn’t have to be a mystery, they can work for you, too.