I was suicidally depressed many years ago. Despite having had all manner of Dharma spoonfed to me by some of the greatest living masters, I had on some level failed to really apply it. I had a year of so-called freedom in a Western city in the lead up to being given some special dharma things, but instead of learning from this experience I just went sort of crazy then numb. When I was really at the lowest, my root teacher phoned me up and gave me some emergency instructions which saw me through until I could go into retreat and work with the root issues.
I'm not really someone who should give advice about this, but in my experience the following works well.
Use the pain, insecurity, doubt, confusion for tonglen and lojong, really go all out on this as much as possible. Don't force yourself to sit too much as sometimes the eomtions can come up and be overwhelming. Make a lot of aspirations, work on love and compassion and give yourself time to do other things that are good for you like exercise and getting into nature. Try to do something where you work with your hands in nature like gardening maybe.
"It's not ok to practice Dharma sometimes, just when you feel like it. You have to practice all the time" - Lama Rigzin Rinpoche.