Tim Mosenfelder/Getty Images

The best cure for loneliness may not be seeking the company of others, but rather, just the opposite: focusing inward and addressing the negative thoughts that underlie loneliness in the first place.

A recent University of Chicago study reviewed the results of 20 previous randomized trials on loneliness therapy and found that those involving interaction with others, receiving social support or improving social skills were not the most effective. The most useful treatment was to rid people of what’s known as maladaptive social cognition — negative thoughts about self-worth and how other people perceive you.

“People who are lonely tend to be cynical, self-conscious and untrusting,” says Christopher Masi, the study’s lead author. “They have an abnormal perception of themselves and what people think about them.” (More on Time.com: Don’t Choke: 5 Tips for Performing Under Pressure)

In Masi and colleagues’ meta-analysis, which was published online by the journal Personality and Social Psychology Review, the researchers found that addressing maladaptive social cognition through cognitive behavioral therapy, a technique used to treat depression and eating disorders, worked best because it empowered patients to recognize and deal with their destructive beliefs, which Masi says are really “just hypotheses that should be tested.”

Interventions designed to increase social interaction or support weren’t as effective because they didn’t deal with the source of the problem.

Masi, who is also a practicing physician, says health-care providers should look out for the lonely for two reasons: One, loneliness is a medical issue; lonely people are at greater risk for health problems, such as depression, high blood pressure and diminished immunity. Two, there will simply be more lonely people due to demographic shifts. For instance, the elderly, who are susceptible to loneliness because they tend to socialize less with friends or family, are expected to double their population size in 40 years. (To be clear, lack of social interaction can prompt loneliness, but the reverse — merely increasing interaction — doesn’t necessarily cure it.)

Mima Cattan, a mental health expert and a professor at the U.K.’s Northumbria University, agrees that examining an individual’s personality, the typical focus of most U.S.-based loneliness studies, is crucial for the treatment of loneliness. But she notes that “there is also increasing evidence that context plays an important role,” a point that Masi says is valid. (More on Time.com: 5 Little-Known Truths About American Sex Lives)

Still, Masi cautions against chronically lonely people socializing with others before seeking treatment as this may result in a “self-reinforcing loop.” He writes in the paper:

Lonely individuals not only communicate negativity to others but also elicit it from others and through others. This perpetuates a cycle of negative interactions and affect in the lonely individual and also transmits negativity to others to affect their interactions as well.

So should you run to a therapist the next time you feel lonely? It depends on how severe your sense of aloneness is. “Loneliness occurs in everyone,” Masi says. “But if an individual has recurring feelings of low self-worth and thinks about loneliness on a daily basis, then that individual may experience this downward spiral.

More on Time.com:

One-Night Stands Explained: Men Prefer Hot Bods to Pretty Faces

Real-Life Romeos Don’t Compare to Dream Lovers