ARCHIVED CONTENT: As a service to our readers, Harvard Health Publishing provides access to our library of archived content. Please note the date each article was posted or last reviewed. No content on this site, regardless of date, should ever be used as a substitute for direct medical advice from your doctor or other qualified clinician.

Depression, bipolar disorder, and other mental health problems arise when something goes wrong with brain function. What causes that malfunction is an open question. In some people, a serious infection or autoimmune disease could be the trigger.

A report published online in JAMA Psychiatry explores this hypothesis. Researchers turned to comprehensive Danish databases that include all Danes born in the country, each identified by a unique registration number. One of the databases stores health-related information, including records of hospitalizations. Among Danes born between 1945 and 1995, almost 92,000 had a mood disorder. Of these, 36,000 had suffered a severe infection or developed an autoimmune disease (such as type 1 diabetes, celiac disease, lupus, and the like) at some point before being diagnosed with the mood disorder.

People who had been treated for a severe infection were 62% more likely to have developed a mood disorder than those who never had one. An autoimmune disease increased the risk by 45%. Multiple infections or the combination of severe infection and an autoimmune disease boosted the odds of developing depression, bipolar disorder, or another mood disorder even further.

The researchers estimated that in the Danish population, severe infection and autoimmune disease account for 12% of mood disorders.

“A link between infection and depression and mood disorders is intriguing,” says Dr. Michael C. Miller, assistant professor of psychiatry at Harvard Medical School and a member of JAMA Psychiatry’s editorial board. “But it’s important to keep in mind that both infections and mood disorders are very common, making it difficult to tease out what causes what.”

He ticks off three possible explanations for the results:

Severe infection and autoimmune disease may cause mood disorders.

Mood disorders may create a susceptibility to infection or autoimmune disease.

Mood disorders, severe infection, and autoimmune disorders may share common triggers.

What’s the connection?

The Danish study isn’t the first to explore links between infection or autoimmune diseases and depression. Much of the evidence supports a connection.

Depression isn’t the only mental health issue that may be related to infections and autoimmune condition. Writing last year in the Harvard Health blog, Dr. Jeff Szymanski described how some children with strep throat suddenly develop obsessive-compulsive disorder. It’s one manifestation of pediatric acute-onset neuropsychiatric syndrome. Quick treatment with antibiotics can reverse the problem.

How might an infection or autoimmune disorder lead to a mood or other mental health disorder? Infection causes localized and body-wide inflammation. Inflammation generates substances called cytokines that have been shown to change how brain cells communicate. In autoimmune diseases, the body’s defense system attacks healthy tissues rather than threatening invaders. It’s possible that in some cases the wayward immune reaction could target brain cells and other nerve cells throughout the body.

The connection between infection, autoimmune disease, inflammation, and mood disorders has prompted some researchers to wonder “Can we vaccinate against depression?” The short answer, at least for now, is “no.”

But there are things you can do. “Healthy living has all sorts of benefits,” says Dr. Miller. It can help you fight infection, reduce inflammation, ease stress, and make you feel better day to day, all of which work against the development of a mood disorder.”