Religion can be a source of comfort that improves well-being. But some kinds of religiosity could be a sign of deeper mental health issues.

Seeing their kids more eager to pray than play video games, most parents would shout, “Hallelujah” or whatever their expression of joy. And they should. Research shows that religion can be a positive force in the lives of children, just as can be for adults. “Religion,” says Bill Hathaway, a clinical psychologist of religion and Dean of the School of Psychology and Counseling at Regent University, “is related to the child having a higher sense of self esteem, better academic adjustment and lower rates of substance abuse and delinquent or criminal behavior.”

So if your child is immersed in scripture after school and prays regularly throughout the day, you may breathe a sigh of relief. She’s such a good girl. My boy is okay.

Or maybe not. Your child’s devotion may be a great thing, but there are some kids whose religious observances require a deeper look. For these children, an overzealous practice of their family faith — or even another faith — may be a sign of an underlying mental health issue or a coping mechanism for dealing with unaddressed trauma or stress.

Therapists in private practice report that they are seeing children and teens across a range of faiths whose religious practice can be problematic. The amount of time they spend praying, or in other acts of spiritual practice, is not as important, they say, as the quality of this devotion, and whether it helps the children or instead isolates them and undermines their schoolwork and relationships. Children with obsessive-compulsive disorder (OCD), for example, may rigidly repeat holy verses, say Hail Mary’s or focus on other rituals less out of a deeper sense of faith but more as an expression of their disorder. “It looks positive but could be negative,” says Stephanie Mihalas, a UCLA professor and licensed clinical psychologist.

Such ritualistic behavior, she says, may also reflect a child’s way of coping with anxiety, and in reality could be no more spiritual than fanatical hand washing or dreading to walk on cracks. “These kids fear that if they don’t obey their religious rules perfectly,” explains Carole Lierberman, MD, a psychiatrist in Beverly Hills, “God will punish them.”

Some children suffer from scrupulosity, a form of OCD that involves a feeling of guilt and shame. Sufferers obsessively worry that they have committed blasphemy, been impure or otherwise sinned. They tend to focus on certain rules or rituals rather than the whole of their faith. They worry that God will never forgive them. And this can signal the onset of depression or anxiety, says John Duffy, a Chicago area clinical psychologist specializing in adolescents. “Kids who have made ‘mistakes’ with sex or drug use,” he says, “may have trouble forgiving themselves.”

Such fastidiousness to religious practices may not seem so harmful, but extreme behavior such as delusions or hallucinations may be a sign of serious mental illness. Seeing and hearing things that are not there can be symptoms of manic-depressive, bipolar disorder, or early onset schizophrenia. But parents may be less attuned to such unhealthy behavior when it occurs under the guise of faith.

It’s not unusual that children in families where marital discord, harsh discipline, abuse, or addiction are present, perform rituals for protection. If they know their parents approve of religion, says Lieberman, “they try to be good little children and stay below the radar of the family chaos or parents’ rage.” Or, as Mihalas has seen, some children push their already observant parents to be even stricter, fearing that catastrophe will strike otherwise.

When does religiosity raise these red flags? The crucial test focuses on how the kids are functioning in the rest of their lives. Are they doing well at school, playing sports or music, socializing with friends? If so, then their faith is probably a source of strength and resilience. If, however, the religious practices and rituals seem to be overtaking their daily lives, and displacing their normal activities, experts suggest taking steps to understand what’s triggering the focus on faith. To guide the discussion, here’s what they recommend:

Model a healthy balance between religion and life

Show them in your own behavior, suggests Mihalas, how religion can co-exist with enjoying life.

If your child switches to a different style of religion, be tolerant

If your children are doing well in other areas of their life, don’t panic, says Hathaway. Unless you feel strongly that they are morally wrong, take this shift in stride.

Be alert to a sudden and pervasive shift in religious practice

Talk to your child about it. Ask her what her religion means to her. Ask him what he is getting out of it, how it makes him feel.

If you feel your child needs help, find a therapist comfortable with religion

Before engaging a therapist, ask about his or her comfort level with devout religious practice.

Religious families need not worry that therapy will draw their child away from their faith, Hathaway says. He recalls one girl struggling with anorexia who felt that she could never be “good enough” to satisfy the harsh, judgmental God of her imagination. After psychological treatment that included a spiritual element, she not only recovered from her anorexia, she developed a more positive view of God, of other people and herself. Instead of being weighed down by guilt and anxiety, her spiritual life became a comfort and joy. And that’s the role that religion should have for people of faith.