One immediate and incremental thing you can do is start seeing a therapist. It's not just for the depressed, I think everyone can benefit from therapy, but you really might find help in your situation. I'd also get a personal trainer and gym membership if you don't already have one.
Basically, you can afford to pay for some external motivation, and you don't need to be motivated to make money, so you can get motivated to work on yourself for a bit.
On top of that I'd try to give yourself something to look forward to after you finish your masters. Maybe book some nice travel, but buy the tickets soon so you know you're really going!