Lieryn Barnett sometimes is so depressed, all she wants to do is sleep.

Other times, she’s so full of energy, she’ll be up in the middle of the night, singing or playing guitar. Or her mind will race at the same time her body won’t have the energy to do anything.

All are symptoms of the bipolar disorder Barnett was diagnosed with when she was an adolescent.

Medication and therapy have helped her deal with the condition, the 29-year-old said.

So has her faith.

“Christ gives your life value, purpose, hope and eternal security. Without that hope, I probably would not be here today,” said Barnett, a member of Two Cities Church in Winston-Salem, N.C., who has written about her experiences with bipolar disorder, depression and anxiety.

A new study by the Christian research firm Barna Group suggests that Barnett may not be alone in her anxiety — or in finding that faith can be an asset when dealing with mental health concerns.

“The church and institutions of faith need to be emotionally connected and places that are able to handle the kinds of emotional, mental health, anxiety-oriented questions that this generation is bringing to them,” Barna President David Kinnaman said.

The study, released Tuesday, is the research firm’s largest and its first global look at what it calls “the connected generation” — those from 18 to 35.

In partnership with Christian relief agency World Vision, Barna surveyed 15,369 people from 25 countries, including people from a range of faiths and people with no faith affiliation. The survey was conducted in nine languages.

It found that 4 in 10 young adults in the countries surveyed report they often feel anxious about important decisions, uncertain about the future or afraid to fail.

Additionally, 28% of young adults report that they often feel sad or depressed. Of the countries that were surveyed, the United States had the highest number of respondents who felt this way: 39%.

And 22% of young adults in the study report they often feel insecure in their identity.

One in 5 young adults surveyed met Barna’s definition of “anxious,” according to the research firm. That means those respondents selected three of these four statements: “anxious about important decisions,” “sad or depressed,” “afraid to fail” and “insecure in who I am.”

The study did not address questions of clinical depression or anxiety, which require the assistance of mental health professionals.

“You can see that there is this low-grade anxiety that this generation is trying to work through,” Kinnaman said.

Religion can help with that, the Barna president said.

People of faith are less likely to select any of those statements, according to Barna data. Meanwhile, those who claim no faith are more likely to select them.

For instance, 37% of respondents who identify as atheist, agnostic or none report they often feel sad or depressed, compared with 23% of Christians and 26% of people of other faiths.

Natasha Sistrunk Robinson, who spoke with Barna as it was compiling its report, sees that “low-grade anxiety” in the young adults she mentors.

Sistrunk Robinson — a speaker, coach and consultant — said some of the anxiety comes from the pressure that young adults put on themselves. Young adults are also dealing with questions of gender and race, she said.

Then there is the ever-present nature of technology, which has left young adults constantly bombarded by news and comparing their lives to others’ carefully curated social media presences.

Previous generations may have navigated one or two of those challenges, she said.

“But now you’re trying to navigate all of that at once,” she said.

Sistrunk Robinson also knows that genetic factors play a role in anxiety, depression and other mental illnesses — and that dealing with mental illness often requires professional help.

She didn’t always see things that way. In the past, she’s encouraged young people dealing with mental illness to “pray and go to church and have faith.”

Now she realizes that’s not enough.

“As people of faith,” she said, “we have to be very clear that some people need medical attention.”

The world has come a long way in its understanding of mental health since the 1990s, according to Rabbi David-Seth Kirshner of Temple Emanu-El in Closter, N.J. That’s when his brother died by suicide after struggling with mental illness

Kirshner said he can’t look past the first row of his congregation without seeing someone dealing with mental health challenges in some way — and it’s not just young adults.

“Regardless of where you are socioeconomically, what your background is, no one is immune to it,” he said. “Everyone’s dealing with it in some fashion or another, and ways that we can show other people they’re not alone and give tools to help mitigate the crisis they’re dealing with, I think, are critical to making forward progress.”

Religion has a role to play for those dealing with anxiety and other mental health issues, according to the rabbi.

A faith community can gather around a person who is ill, either physically or mentally, to provide support, Kirshner said. Time spent at the synagogue can be a refuge from the hectic pace of everyday life.

Prayer can help as well, he said.

Kirshner pointed to what he called the “get well” prayer Jews have prayed for generations, which he translated as saying, “We pray for this person to have a healing of their body and the healing of their soul and mind.”

Religion also can give people a sense of identity and belonging, according to Kameelah Rashad of the Muslim Wellness Foundation.

Faith always is intertwined with culture, Rashad said. She has found in her work with black Muslim young adults that “Islam is foundational to their understanding of themselves.”

“They would say, ‘I have this two sort of targeted and marginalized identities, but I also feel that God made me this way intentionally,” she said. “Because I am who I am, I can be someone who actually helps build bridges and communities. I can be someone who empathizes with other marginalized communities.”

There’s a feeling that “God has my back,” that there is wisdom to be gained from the experiences they have, she said.

That sense of community and identity have been important for Barnett.

“Mental illness is something that I have, not who I am,” she said. “My identity is found in Christ.”

She often worries about disclosing her illness to others outside her church, she said. There, she feels she can be open about her struggles.

Nobody treats her differently there unless it is to offer help when they know she is struggling. Her pastor has started to name mental illnesses from the pulpit. And she feels freed by a theology that makes clear nobody is perfect.

And millennials, like Barnett, are leading the way in talking about mental health and breaking the stigma.

“If you are brave enough, share your struggles — I guarantee you aren’t the only one in your church,” she said.

Other findings of Barna’s study, titled “The Connected Generation,” include:

• Three-quarters (77%) of young adults surveyed say events around the world matter to them, and more than half (57%) report they feel connected to people around the world.

• Few feel connected to those closest to them: Only 1 in 3 (33%) report they often feel deeply cared for by those around them. A similar number (32%) report they often feel somebody believes in them.

• More than half of those surveyed report religion is good for people (57%) and important to society (53%).

• Christian young adults aren’t convinced the church has answers to all their questions. Nearly half (47%) of those with some connection to Christianity say it cannot answer all their questions.

The survey was conducted online between Dec. 4, 2018, and Feb. 15, 2019, requiring both literacy and an internet connection for young adults to participate. The margin of error is plus or minus 1 percentage point, according to Barna.