Sorry to hear about your situation. I was at a similar point a couple years ago. I didn't have a specific event, more like a bunch of smaller things that I ignored until they turned into one big problem for my life that hit me hard. My day-to-day experience felt a lot like yours. I had once been very ambitious, but it felt like I had completely lost it. Even doing basic programming tasks like writing a bunch of simple tests felt like a huge hurdle. Just getting out of bed at a reasonable time and eating meals at the proper time, or getting dressed and out of the door felt like huge accomplishments.
The bad news is that even after two years I'm still not back to 100%, and some days everything feels like a drag. The good news is that things to do get much, much better.
The first thing I would suggest is to see a mental health professional. If you've had success with some medication, but not others, seeing a professional who can guide you towards proper treatment is the best thing you can do for yourself. Second, I would suggest taking a real break, if that's possible. In my case, I took three weeks off, doing pretty much nothing, and then spent a couple months working a straightforward software engineering job. That gave me the time to really clear my head and focus on myself without worrying about other things.
The third thing is to invest in proper self-care. Getting regular exercise, strenuous enough to break a sweat or leave your muscles a little sore made me feel much better. Regular exercise and the resulting endorphins are known to help with depression. Try to eat good food: regular meals with lots of fresh vegetables and protein, minimal carbs, and as little sugar as you can manage. Even up to this day, getting regular workouts and watching what I eat is the best way to maintain my mental health and feel better about myself. I've found meditation really helpful for calming myself down and getting my mind in order, but I know that meditation isn't everyone's cup of tea. Another short-term hack is to get showered and dressed in the morning everyday. Just looking cleaned up and put together made me feel better about myself.
I know that doing all of the above sounds like a lot, especially if you are short on money and time. I would suggest starting with exercise and good food. If nothing else, go for a long walk, or a run along the block. There are lots of websites with simple recipes that will help you get started cooking and eating well.
Like I said, I'm not back to 100% even today, but I'm much better than I was two years ago. Most days I can put in a few solid hours of work, there are very few days when I get nothing done. Some times I slip because I'm not organized even to do everything I want, but I manage to eat well, stay healthy (mentally and physically) and be fairly productive.
Do let me know if you have any further questions.