The mental health of a parent is relevant to the court in a child custody dispute. However the communications between the parent and their therapist are privileged. There are some exceptions to this rule such as if that parent put their mental health at issue. If a party is concerned about mental health issues, they can request that the court order a psychological evaluation; this can be expensive and the cost is paid by the parents, not the Court.