Look, my opinion to anyone involved in a parenting matter is to complete a post-separation course. The content is great and it shows a Court that you're willing to try and alleviate conflict and focus on the kids.
Now, the commitment matter isn't something anyone can guarantee. Not even a Court order will force a parent to spend time with their kid, but perhaps the best way to address this is for your friend to enter into a parenting plan with the father for regular time with the child. A schedule, one that suits her and one she can stick to so the child has the benefit of consistency and routine, is the best option.
Seeking help for her mental health may be as simple as getting a mental health assessment completed. Is she actually suffering from a mental illness, or is this just dad being pedantic? And why is he seeking a drug test? Has she got a history of drug use?