Vitamin B12, at just marginally low levels can contribute to depression and memory problems. As we age, vitamin B12 may not be absorbed as readily, even if the recommended daily requirement is met through the diet. Vegetarians are also at risk for a Vitamin B12 deficiency. Minerals that play a role in the development or prevention of depression, irritability, and mood swings include calcium, iron, magnesium, selenium, and zinc. In other words, if you have too little cholesterol in your blood, you may be subject to depression.
Cholesterol also assists in the absorption of essential fatty acids.
The bottom line is that food plays a key role in maintaining mental health. Eat at least three times a day, including breakfast, with regular snacks. Eliminate caffeine-containing foods and beverages as much as possible. Replace sweets with different varieties of fruit. Drink plenty of water 6-8 glasses per day.