I would seek professional help to find and deal with the cause of the depression. A good therapist will also help you learn your triggers and some good tools to use to combat this given your specific set of symptoms.
In the meantime, you can try journaling and exercise (at the very least, a walk whenever weather permits).
As far as homework, you can give yourself tiny goals. As each is met, you give yourself a reward. My thing was I'd let myself have a piece of chocolate after a certain amount of problems or (on a really good day) after I was completely finished with a subject altogether.