The topic is also covered pretty well in the book "Feeling Good: The New Mood Therapy" by David D. Burns. I think it helps to recognize or understand some of these behaviors when there's someone in your life that has these kind of thoughts.
Don't be put off by the stigma of the self-help section. The main value of the book is a collection of clinically-tested exercises for breaking bad habits, collecting accurate data about your mental state and systematically disentangling reality from cognitive distortion.
If I had my way this book would be compulsory high-school reading.