It's pretty much fact that people who are clinically depressed demonstrate distorted thinking. Their reactions to negative events are skewed and they're more likely to make attribution errors--that is, to assign distorted meanings and causation to the things that happen to them.
Three specific attribution errors have been demonstrated to be typical in people who are depressed; my non-scientific guess is that they also show up in non-depressed people and contribute to feeling bad.
1) Internal versus external. People who are depressed blame themselves when things go wrong. In contrast, people who aren't depressed are more likely to attribute negative events to external factors like bad luck, chance, or others' actions. For example, a depressed person who doesn't receive a call back after a job interview assumes she made a gaffe during the interview or didn't prepare well enough. A non-depressed person is more likely to acknowledge that another candidate may have had more experience, or that the position could have been given to an internal applicant. A depressed person who gets hit by a car blames himself for not being more careful, even though the driver was running a red light; if his child gets bullied at school, he blames himself for poor parenting even though the bullies are targeting other kids too.
2) Global versus specific: Non-depressed people typically view negative events as having only isolated or limited significance. In contrast, depressed people are more likely to conclude that a negative event has far-reaching or global implications. For example, a depressed person whose relationship didn't work out generalizes to other areas of his life and concludes that he has failed in every area; a non-depressed person is upset about the end of the relationship but can still acknowledge areas of his life where things are going well. A depressed person misses the bus in the morning and concludes that her whole day is shot; a non-depressed person acknowledges that the morning started poorly but figures that everything will be fine once she arrives at work.
3) Fixed versus changeable: Whereas non-depressed people often adopt a 'this too shall pass' attitude toward negative events or situations, people who are depressed view the same problems or situations as unlikely to change or improve. A depressed person feels lonely and believes she'll always be lonely; a non-depressed person acknowledges that she's going through a period of feeling alone but that it won't always be this way. A depressed person whose washer and dryer break in the same month that his cat gets sick and his transmission dies can't imagine a future wherein such things aren't happening to him; a non-depressed person knows that he's just having an unusually bad month. A depressed person who fails her exam because of poor study habits wonders if she should just give up on school altogether; a non-depressed person figures she can probably get help and learn new study habits.
In depressed people, attribution errors are problematic because they promote hopelessness and maintain depression. In non-depressed people, attribution errors just make us feel bad unnecessarily. In both cases, the first step is to realize that we're falling for these errors in thinking. The next time you're feeling down about some negative event, ask yourself if you're making an attribution error. If you think you might be, ask yourself: Is it really my fault? Am I overgeneralizing? What can I do about it?
NB: For other good questions to help you out of negative thought patterns, see here.