Christian reality TV star Jessa Duggar Seewald recently shared three videos by Baptist pastor John Piper, one of which calls anxiety a sin.

Several Instagram commenters and at least one blogger were not happy with the implication that people could “pray the anxiety away.”

For many people, prayer is an integral part of their faith. And there’s research showing that prayer has some health benefits.

But experts say substituting prayer for medical treatment, especially with serious conditions such as anxiety and depression, can lead to years of struggling and more serious complications, including death.

Can prayer help others heal?

A number of studies have looked at the effects of religion or prayer on health — with some showing positive benefits.

One study, published last year in PLoS One, found that people who attended church more than once per week were 55 percent less likely to die during the 18-year follow-up period than people who didn’t frequent church.

A 2016 study from JAMA Internal Medicine also showed that women who attended church services more than once per week were 33 percent less likely to die during the 16 years of follow-up than non-churchgoers.

These studies, though, don’t show whether it is religion that is giving the health boost or some other factor, such as social support.

Solo prayer is harder for researchers to measure than church attendance for a couple reasons. For one, “How often do you go to church?” is an easy question for people to answer. And two, different people may have different ways of praying.

Also, people tend to turn to prayer when things are going badly — such as when they are sick, lose a loved one, or are fired from a job.

“A lot of times prayer becomes a marker for distress or even greater physical illness, because it’s during those times that people turn to prayer for comfort,” said Dr. Harold Koenig, director of the Center for Spirituality, Theology and Health at Duke University, and author of “Religion and Mental Health: Research and Clinical Applications.”

Studies done at one point in time in a person’s life — cross-sectional studies — may include only people who are struggling.

Overall, research on the benefits of praying for others, known as intercessory prayer, has been mixed.

One review of past studies found that praying for someone else has small health benefits for the person being prayed for. Another showed no effect at all.

And one study suggests that prayer may make things worse. This study, published in 2006 in the American Heart Journal, found that people who knew that someone else was praying for their recovery from heart surgery had higher rates of complications than people who weren’t being prayed for.

Praying may boost mental health

Praying for others might not help them that much, but several studies have found benefits for the person doing the prayer — whether they are praying for someone else or themselves.

This may stem from the effect that the act of praying has on a person’s mental well-being.

“The compassion that people display toward others when they pray for them is something that is good for the person doing the praying,” Koenig told Healthline.

Prayer may also have similar effects on mental well-being as meditation and yoga, which spill over into physical effects.

“Any benefit to mental well-being, which I think prayer has, is going to translate into benefits for physical well-being over time,” said Koenig.

He is quick to point out, though, that he’s not talking about prayer “miraculously curing someone.” Instead, prayer can improve a person’s mental health, such as reducing anxiety and stress.

In turn, this can translate into “better physiological functioning,” such as lower levels of the stress hormone cortisol, lower blood pressure, and improved immune functioning.

A 2009 study by Koenig and colleagues found that six weekly in-person Christian prayer sessions with patients at a primary care office lowered their depression and anxiety symptoms and increased their optimism.

The prayer was led by a lay minister, but the patients sometimes joined them in praying. So it’s uncertain if the effects are the result of being prayed for or the act of praying.

Other studies have found that prayer decreased symptoms of pain after a C-section and improved the quality of life in women undergoing radiation therapy.

Prayer instead of treatment

Koenig said there’s a particular need for studies that follow people over decades to “see if those who regularly spend time in prayer end up experiencing better mental and physical health over time.”

Does this mean you can ditch your doctor or psychologist and pray instead?

“Absolutely not,” said Koenig.

Serious mental and physical problems are not things to mess around with.

Left untreated, anxiety disorder can lead to physical problems and an increased risk of suicide and depression. Depression is linked to physical illnesses, social isolation, and premature death.

Other untreated illnesses can also lead to death or other serious complications.

A study last year in JNCI: Journal of the National Cancer Institute found that people who chose only alternative medicine therapies for their cancer were 2.5 times more likely to die than those who used conventional cancer treatments.

This study didn’t look at prayer specifically, but it does show the risks of avoiding medical care.

Even though prayer may not “miraculously” cure you, there may still be a place for it alongside traditional treatments.

“The combination of getting the best medical care and having a strong religious faith and prayer can lead to better mental and physical health,” said Koenig.