I've been there not too long ago.
I basically realized that my plan/ routine for living was not working so I would do the complete opposite of what I had been doing.
For example: instead of staying home watching TV I had to get off my ass and start exercising and instead of staying up late and sleeping all day I started going to bed early (except for tonight , oops).
It's like; if you have a broken record would you keep playing it over and over? I hope not, you would throw it away and put on a one a different one that works.
My depression is partly due to my genetics but it has been exacerbated by a circular trap of bad habits.
Change what you do » changes what you think » which changes how you feel.
I also realized that I had hard-wired my brain to default to negative thoughts ( like "this sucks, I'm tired, I am different, I'll never be happy, etc ").
I think of my brain as this incredibly powerful supercomputer that has been running a dysfunctional software and that my brain needs to be reprogrammed to think more positively or else I will keep feeling the same way.
This is pretty much the idea behind cognitive positive psychology. Since I am not very good at coming up with my own positive thoughts, I have just been stuffing my brain with new thoughts. It's the same idea as "you are what you eat". I've been reading books on positive psychology and biographies ( Winston Churchill is good, he had depression), meditating with recordings of affirmations ( there are tons of Apps with those recordings), keeping a gratitude list, taking weekend trips out of town, keeping a daily routine, exercising, and keeping in touch with friends. It's hard at first but then these things just turn into new habits (my therapist told me it takes 3 weeks to make a new habit) and they become automatic, sort of like "fake it 'til you make it". I still get bummed out and feel hopeless sometimes but not as often as I used too and I know that I can do things to change what I'm thinking and consequently changing my moo. I've found that saying "move a muscle, change an emotion" really works.
Also, whoever said "get a dog" is right. Having a dog forces me to get outside, walk, meet my neighbors, and laugh.
My dog Piggy is hilarious and a great distraction from the committee in my head. (Churchill had a cat he took everywhere that he said helped him significantly with his depression)
Good luck!