@TripleR , it's good that you've found the courage(?) to speak up on what you're currently feeling, and I/we can only but empathise with your situation. I haven't gone through anything like you've gone through myself, but I can only imagine how you must sometimes feel when you went from a toxic environment, to then having everything work out perfectly for a short while, for it to then go down the pan (so to speak).
Do you feel any better in yourself for opening up and sharing what you just have? Even if it is to a bunch of strangers?
You're no doubt still (trying to) adapt to the change of circumstances, and five months isn't really much time at all to get over someone you've been with for over three years. It's not entirely related but back last year I went on a couple of dates with the same girl, and even though nothing came of it, it took me a good three or four months to get her out of my head, so I can only imagine how you must be struggling.
If we take a look at your life for a minute, you've clearly stated that you've suffered with depression, had a horrid family life, and was constantly rejected and yet despite all of this, you (not anyone else) managed to turn your life around. If you've had the determination and ambition to do that once, I have no doubt that you have it within you to do that again, it just might not currently be the right time for you to do so.
The gym will obviously fill some of your time, but what else could you do, or what else do you think you may enjoy doing that you could give a go? Are you interested in any sport, maybe join a running club? Are you interested at all in card and board games? Are there any local events with that? Have you tried MeetUp.com? There's usually a vast selection of groups on there, even if they are just social.
Do you actually want to be dead though, or do you just wish life would improve? If the latter, then you have the means to make that improvement.
Today might suck, tomorrow might suck even more, and next week might suck too, but next month, or even next year may be the best times of your life. I can't imagine you want to throw that away.
What I think you should take away from this is that it has been an experience. It might not have ended well, but it was an experience all the same. It's things like this that build us, make us stronger, give us perspective. You've obviously got a challenge ahead of you, but I think you're capable of overcoming that and getting out on top. You've done it before. You just need to believe in yourself.