Yes and no.
Nutrients are essential a balanced diet. So the lack of it does increase the risk of any type of illness, mental or physical. There are various plants that contain natural antidepressants, stress relievers and other elements that work with both, memory problems and mood problems.
However a balanced diet, means nothing if the atmosphere at home isn't good. It's the same thing with giving a child anything it needs but affection. It'll be healthy as a stone, as far as the body goes, but scared for life as far as mind goes.