Getting enough magnesium helps to fight levels of the stress hormone cortisol and vitamin D deficiencies are often tied to depression