Mental illness in one form or another is surprisingly common. Approximately 44 million adults in the United States suffer from a mental health disorder. Many of those people are parents.

So, what happens if they get divorced? When does a parent’s mental illness factor into a custody battle?

There’s no easy answer to this question. Here are some of the factors that need to be considered:

1. Is there a risk of violence toward the children?

Some mental health conditions are more problematic than others. Addiction and alcoholism, for example, are both mental health disorders — but they’re also associated with violent behavior. So are certain other conditions, like borderline personality disorder (BPD). If a parent has a mental health problem that has led to violence in the past, it’s only reasonable for the court to consider what might happen in the future.

2. Is there a strong potential for child neglect?

Some mental health conditions make it difficult for the person who is ill to take care of themselves — let alone a child. If a parent suffers from severe bipolar disorder, schizophrenia or major depression, they may not be able to function well enough to make sure that the children have everything they need to survive and thrive — including meals, clean clothing, a safe house and a set schedule. That’s another situation that can cause mental health issues to become a factor in a custody case.

A diagnosis of a mental health disorder doesn’t automatically mean that a parent will lose custody or visitation rights. Many people function very well on medication or through counseling. However, the court will always place the interests of the children above the parent’s interests in any custody battle. If you’re concerned about your chances in a custody battle due to your mental illness or your spouse’s, discuss the issue with your attorney right away.