Had a terrible relationship with my ex girlfriend, was doing bad at my sales job, stopped going into work, had to move in with my mother, wasn't productive for weeks, etc etc. Spent all day procrastinating on the internet. I got into such a rut and put myself in such a bad mindset that I'm surprised I ever got out of it.
But what I did do that turned everything around was exercised and started eating better. That is the only thing that helped me. It makes you feel absolutely great every single time you are done. It gives you energy and removes that lethargic feeling from you. It forces you to stick to a schedule because you have to go to sleep at your bedtime because you're exhausted. You start to crave good food and don't want junk because your body becomes more demanding and powerful. You are pumped full of testosterone which is what gives you motivation and aggression to make the world bend to your will, etc etc.
I would recommend bodyweight exercises, so you don't need to go to the gym or anything else that will get in your way and let you pass it up. Body weight exercises are, as the name implies; just using your body as the weight itself. Pull-ups, leg lifts, push-ups, dips, squats etc. Now when you combine all of this into a rather large set where you don't take any breaks in between it can be quite intense and exhilarating. For example, do 10 pushups, jump up, 10 squats, drop down, 10 leg lifts, repeat. That will get your blood pumping. Another intensive bodyweight exercise is called a burpee, try to do 50 of those and you'll absolutely die.
When you get more serious you'll want to buy a barbell like I have for myself. I don't need to go to a fancy gym I can workout almost every muscle group with just my one bar. The hardest part is to get into a routine, and not over exerting yourself the first couple of days. You want to get into a routine where it's demanding but not over demanding where you'll start to regret the thought of it before you even begin. Something that's not going to take you to motivate yourself for hours to do before hand. Write out a program of ideas you expect yourself to do everyday. This helped for my brain, to have it meticulously planned out before hand with check boxes to tick off after each exercise was completed. It felt like I was really accomplishing something and I was getting healthier all the while. You need some testosterone and endorphins in your life buddy and then I think everything will begin to fall in place.