For me, it was a combination of things, here's the order I've tried: 1. Lift weights 2-3 times a week. 2. Avoid caffeine after 10:00am. 3. Stop eating like an idiot. 4. Go to the doctor and get blood work done. Turns out my hormones were all screwy. I had to get three different opinions before I found a doctor who gave me more info than "go to sleep sooner" and actually gave me some vitamins and hormone pills that helped a lot. 5. Therapy (CBT). It took me going to 3-4 therapists before I found one that jived with me.
For some people you just need to do step 1 or 2. For me it took all five. My biggest lesson is that doctors are just people to who are trying their best. Don't be afraid to see more than one or push them if you're not getting results. They can only help you as much as the feedback you give them.
It was totally worth doing all this though.