I was already starting to feel my cartilage go wobbly.

I Skyped my boyfriend. “You’re required to still love me after my nose falls off,” I told him. “Like that lady from The Knick.”

It’s around this time that I could have used an app called Songify. The app turns words that are spoken into a smart phone into a song, auto-tuned and set to music. And now, some mental-health specialists are using the tool to help people overcome obsessive, anxious thoughts like the one I was having. With its help, I could have made something like this:

The underlying principle is that singing your thoughts separates you from their meaning. Almost all people (something like 80 to 90 percent of the population), experience intrusive thoughts—weird little niggling things they don’t particularly want scrolling through their heads. But for people who have obsessive compulsive disorder or generalized anxiety, the intrusive thoughts can become frequent and crippling. With OCD, the thoughts tend to be bizarre, such as thinking that the air will contaminate you. With generalized anxiety, they might be more mundane, like the idea that you’ll be fired if you bungle a work presentation.

Our minds can be Debbie Downers because, evolutionarily, we are predisposed to dwell on the negative and let the positive drift into the background. Simply trying not to think intrusive thoughts doesn’t work. Focusing on something, even in a negative way, wires it even more firmly into our brains.

“There is no delete button in the nervous system,” said Steven Hayes, a psychology professor at the University of Nevada who has used Songify and other techniques in his practice. By telling yourself not to think about something, he says, “you’re increasing the number of associates that remind you of it.”

Instead, it’s better to treat them just like you would a silly, meaningless song. They exist, but they have little bearing on your life.

Songify was only released four years ago, and it’s even newer to the therapists who use it. But the process behind the Songify technique, called cognitive defusion, has been around for decades. Before the app came along, therapists would have their patients sing their worries to common melodies. Sally Winston, the co-director of the Anxiety and Stress Disorders Institute of Maryland, once treated a mother who would obsessively text her son to check on him. Winston had her sing, “Johnny is dead by the side of the road” to the tune of “Twinkle, Twinkle, Little Star.”

Similar methods, like repeating an unwanted thought out loud until it loses meaning, or sticking Post-It notes with the thought all over the house, have also shown some success.

Thirty years ago, Hayes saw an older patient who was a devout Catholic. During mass, she couldn’t stop imagining the priest with penises growing out of his ears.