In the movie Manchester By The Sea, after Joe dies, Joe's brother Lee is assigned to be Patrick's guardian instead of Patrick's mother. Through flashbacks they show that the mother was an alcoholic. However, Lee appears to be a far worse alcoholic and also admits to smoking pot and doing cocaine the night that everything happened. The worst thing we see the mother do is get drunk, pass out naked on the couch, and fail to walk to the dog. Why is she so much worse of a potential parent than Lee?
There was a brief mention of her having been "in an institution," but it wasn't clear if that was just rehab for her alcoholism, or if it was actually a mental institution that would have disqualified her from taking custody. She certainly seems to have gotten her life together by this point (though Joe probably didn't know that). But given that Lee's substance abuse problems cause him to violently lash out at strangers, clients, and family, and that it caused the accidental death of his own children and ended his marriage, she still seem like a better choice.