Human minds are so complex that even scientists don't fully understand it yet, so there's no 'one' solution to majority of mental health problems. Most psychiatrist will prescribe you with antidepressants, and it might do wonders for some people, but there's still risk of bad side effects, being ineffective, or even worsen your symptoms, which is why I consider it a last resort. Try cognitive behavioral therapy, talk therapy, or exposure therapy before taking any medications.
If going to therapy isn't your thing, you should start practicing radical acceptance (there's many great books and articles about this.) Let go of ideas and attachment of what you think your life needs to be in order for you to be happy. Especially let go of any self-hatred or guilt that might result from what you feel you could've done differently. Emotional freedom technique is a good way of breaking the pattern of self-destructive coping mechanisms, it involves saying "Even though (your current problem), I love and accept myself." This reminds yourself that, deep down, you truly do care about your well being. There's a lot we can't control about life, but try to focus on the things you can.
Buddha once said, "Attachment is the source of all suffering."