In some notorious cases, murders for example, there is often an assessment and diagnosis. For most other cases, it's not that easy. Most courts claim not to know what the problem is and don't try to find out, reasoning they'll deal with the person as they are and based on the behaviors alone. That's what my court did, and even what my CE, a child psychologist, bluntly told me.
If you can get a diagnosis, fine. But have a backup plan, such as one based on the other parent's poor parenting behaviors, in case the court thinks a diagnosis alone is relatively meaningless or just wants to deal only with the parenting behaviors.
Here's an example. Court may deal with two parents, both alcoholics, one who drives drunk with the kids and the other doesn't drive drunk. Court may consider the alcoholic parent who doesn't drive drunk as having issues but not rising to the level of being actionable. But the other parent who drives drunk, with or without the kids in the vehicle, as a higher risk and limit that parent's parenting to address that serious issue.
I've often pondered why courts knowingly issue favorable parenting orders to the poorly behaving parent. I've concluded that they don't want to upset the parenting history and they figure the kids don't require a perfectly protected childhood. Maybe they figure emotional and environmental bumps and bruises will help the kids learn what real life is like once they're grown? Hmm, guess not. Second idea, they figure all they should intervene on are the worst of the behaviors, the ones that rise to the level of child abuse, child neglect or child endangerment and we're supposed to deal with the lesser problems that fly under the radar? Whatever it is, most of us find it hard to get a diagnosis to be equated with meriting preventative action. So have Plan A Part 2 to also emphasis the current poor behaviors.
Yeah, I think the "alcoholic" analogy is a good one (especially since, for all you know, the judge may be a recovering alcoholic herself!).
Proving someone is an alcoholic not only won't help you, it might hurt you. Someone who has been diagnosed with alcoholism, but is taking care of herself - in a program, sober, etc. - is to be admired. The judge might see her as strong, wise, and humble.
But if someone has been diagnosed with alcoholism, and isn't in a program, and denies being an alcoholic, and still drinks, there is lots of data showing that her child is at big risk because of that.
Similarly, if someone has been diagnosed with BPD (or whatever), and has accepted the diagnosis, and is getting the recommended treatment, and if her behavior is OK, that's nothing to be ashamed of, and she might be an excellent parent. The judge might even consider her an exceptional person for overcoming that problem!
But if she has been diagnosed with BPD, but she denies the diagnosis, and doesn't get the recommended treatment, and continues to show BPDish behaviors, then the child is at very high risk - based on tons of published research - risk of alcohol abuse, drugs, depression, suicide, etc. - you name it.
But if you want to go down that path, you have to be prepared to show both parts of that case: you have to prove that your ex has been diagnosed with BPD, and you also have to prove that her BPD puts the child at risk. You can't just say, "I've read it online!". You have to do it in ways the court will accept, like bringing an expert witness to testify about the impact of (untreated) BPD on the child.
As FD suggests, you can't assume that the judge will know that BPD in a parent is bad for the child. The judge may have no idea what BPD is or what it's like to live with someone who has it. And she probably won't give much weight to anything you say, since you are one of the parties in the case - you're not objective and you're not a professional in this field. You'll have to make the case with evidence and witnesses - prove that she has BPD and prove that her BPD puts the child at high risk long-term.
One more comment along these same lines... .
Usually courts focus on what's happening right now. If you want the court to believe that the other parent isn't doing a good job, you bring evidence of the parent's behaviors and show how they are impacting the child. This is what FD is referring to - "parenting behaviors" in the here-and-now.
But BPD may have serious impact that isn't here-and-now, and isn't related to very obvious bad behaviors like violence or neglect. Kids raised by a parent with BPD are exposed to twisted thinking which harms them very deeply over time. So instead of saying, "Ms. Ex's behavior is harming the child" you have to say, "Ms. Ex's untreated psychological disorder(s) put the child at very high long-term risk." You have to convince the judge that giving you primary custody is the low-risk choice, and keeping the disordered parent involved too much is the high-risk option. That's a more subtle thing than saying, "She screams at the kids ten times a day."