I'd like to offer an alternative view of how one might deal with depression on a cognitive level, you can consider it for yourself and try it if you think it sounds reasonable, it's up to you.
Somewhere along the line self-esteem was mentioned by Larc, I don't know what specifically was said about it, but how something is interpreted being an important factor was also mentioned. I'm going to speak to those two points.
Frankly, I don't have any use for self esteem, because to me it's just another self concept, and I'd rather see the real thing as it is in the moment rather than build up some artificial construct that's supposed to identify me and make me feel good and get me through the day. I'm sure that's not for everybody, but I mention it for a reason. This is connected with the point about interpretation. Something happens, perhaps it is something someone else did "to" us, but often times it can be interpreted in a negative way and the result is we feel depressed. Well, you might say my approach is to keep it simple and cut out all the non-essential stuff. Maybe I can interpret things in a positive way, but then that may not be what the other person intended either. (if indeed they intended anything toward me at all) So my approach is to drop interpretation and simply observe what's going on and take it in fully. Of course, in order to do that you have to drop your self concepts too, because people do tend to react from there, and largely from self esteem. "This makes me feel good, that makes me feel bad" is the common reaction. But whether it's the result of something that you had worked on or the opinion of some other person or whatever, what does that actually mean? As far as people go, I really don't care what people feel about me or whether they like me, I DO care about the reasons they might have for feeling that way, but sometimes people just don't like you. If I failed at some task miserably, then I failed at that task miserably, it doesn't mean I as a person am a failure at everything or is even bad at that task, it only means exactly what happened - I failed at that task at that time. (so the same thing applies to people, one person doesn't like you doesn't mean everybody or that you're not a likeable person) Any other interpretation is simply things we add on to it, and doesn't actually reflect the truth of what has happend. I've found that not only does viewing things this way help with depression, it makes your thinking process in general clearer too. I mean how simple can you get? Just don't make up anything, and when you do just recognize that it's just something your mind made up. Maybe this all boils down to a bumper sticker I saw the other day, which simply says "Don't believe everything you think." I think that might be a reminder worthy of being framed on a wall sometimes.