they don't even know.
i had girlfriends with these issues.. they just often lack the emotional maturity/forethought to realize that there isnt' anything other folks can do, and they vaguely expect like other people to just magically make their problems go away, and they resent you for not being the 'cure' to their problem.
it doesn't necessarily have to do with mental health, it could be physical, or just a job they don't like, or a ton of other things.
the issue is the person suffering, is looking for a solution outside of themselves and their own actions, and refuses to acknowledge the solution requires them to change themselves or their circumstances, and often like change habits or lifestyle or etc.
i remember being a suicidal teenager and I just wanted it to stop, i wanted the bad feelings to stop. i had no clue how to get them to stop because they just kept coming at me. some people just... are like this their entire lives and they often self-medicate because that is a way to get them to stop temporarily. but getting them to stop systematically... is a much larger challenge, and there is no guarantee the problem won't come back.
and yeah one option is to join a community or have friends who just validate the shit out of your bad choices or share your frustrations and complaints with. because those folks won't ask you to change or try something new, they will just agree with you that you're fucked and there is nothing you can do.