When mental illness of a parent is involved in a divorce, it is a critical factor in determining who gets custody of children. The court will carefully examine the facts surrounding a parent's history of instability. If you suffer from extremes of anxiety, depression or other mental disease, and are not getting treatment, the judge is unlikely to consider you fit enough to be awarded custody. If you suspect you might need it, seek medical help or counseling before getting involved in litigation about custody arrangements. Alternatively, if you are well and your spouse is sick, and has not acknowledged the severity of the condition or sought adequate treatment, it will go a long way towards persuading the court you should become the custodial parent. Keep in mind that it reflects poorly on your own fitness for custody if you don't intervene with your spouse for the sake of your children. It supports your suitability if you can show that, in a non-confrontational way, you encouraged your spouse to seek treatment or monitoring.