The reason excercise helps is because it reduced cortisol levels.
Cortisol is a stress hormone from the adrenal gland. Hormonal imbalances are responsible for depression. HIGH cortisol levels specifically. Yes, thyroid is also known for its affect on depression when it is not functioning right. But if someone has low or high thyroid , there is almost always (cancer aside) an underlying adrenal issue because it is the adrenals which FEED the thyroid it's hormone that it uses to function. Thyroid test perameters are very very loose. Many people have thyroid issues but test out normal. The perameters are so loose people are pretty damn bad by the time it actually registers on the test.
Be careful about vit D. The main role of vit D is to increase absorption of calcium in the kidney. For people with low adrenal hormone output, vit D would not be wise at all, as the low hormone levels increase blood calcium already. These people can end up with hypercalcemia real fast.
usually when people test out low on D levels, all they need is magnesium to get that D level up. For people with high cortisol or aldosterone hormones, holy basil, PS, Mangesium , calcium, lugols iodine and zinc are all great.
The reason vitamin B works so well on mood is that it feeds the adrenals, and the nervous system both.
Blood sugar levels also come into play. Did you knwo that cortisol is what regulates blood sugar? (and sleep, and stomach acid, and body PH) Very low blood sugar swings (hypoglcemia) can cause depression, and I would guess that high blood sugar swings (diabetes)would as well. The blood sugar has a tremendous effect on mood. People who snap into anger fits, or who have crying jags, or who are manic, or who are alcoholics, should all look closely at blood sugar levels with an A1C1 test. (alcohol affects blood sugar- these people self medicate with out even knowing it).
I would ask my doc for a SALIVA cortisol test to see where the cortisol levels are at.There is a huge push to get people into therapy, but, truly, depression and other personality disorders, are most of the time-rooted in a physical imbalance in the body, usually hormonal in nature.