Her mental health issues would certainly be a factor. A lot depends on how she is treated for them and what the prognosis is. A lot also depends on how these issues are presented to the court. You don't say anything about how she was referred but it sounds as if it might be through a court case. Is this a divorce case or a case where the state is involved with the child's custody? If it is the first, then you have to take an active role in presenting the information, whether that is through an attorney, or if you are doing it on your own. If it is the latter, then you may have a court appointed attorney, and if that is the case, you should discuss the situation with that attorney.
If you found this answer helpful, let me know by clicking the "Mark as Helpful" button at the bottom of this answer. It’s easy and appreciated.
You may want to request a custody evaluation as that is the best way to insure that medical records are considered in your case. Generally medical records are confidential and not typically admissible in court which makes it difficult to get that information before the court so it can be considered.
Sign up to receive a 3-part series of useful information and advice about child custody law.