Bipolar Thoughts

A question recently posed by my psychiatrist: what is the evolutionary advantage to feelings, specifically bad feelings like depression or anxiety?

I should first note that my doctor strictly adheres to the methodology of cognitive behavioral therapy. He believes that all emotions have triggers, and finding those triggers are the key to good health. He also believes that the difference between myself with my mental illness, and another person who does not have a mental illness might simply be varying degrees of ‘born-with’ talents and abilities. Maybe my anxiety eats me alive not because I suffer from higher anxiety levels, but because I cannot deal with normal levels like most people.