Sure, there are real chemical imbalances that can lead to depression, but I'm going to talk about a different source of depression.
Choices have a return. Choices have an emotional return.
If you make a lot of choices to have fun in the moment, you'll have fun in the moment. But the choices we make today will become what we feel tomorrow and the next day and the next day. Choices have an emotional return with a time lapse.
Long-term choices suck in the moment. Working out is hard and dirty. Writing a book sucks. Having a productive day is tiring. But it feels great...later.
A great way to not be depressed is to do something that scares you. You'll get an honest jolt of endorphins! Or write down all the things you know you should today then do them. You'll feel great tomorrow! And you'll be in an upward spiral.
I'm not saying this will work all the time or should be used as a substitute for medical care, but it can get the ball rolling in the right direction.