Well that's a bit of an oversimplification, but just a bit. Here's what scientists have recently discovered:
[A diet] high in fruits, vegetables, whole grains, fish and unprocessed lean red meat—can prevent depression. And an unhealthy diet—high in processed and refined foods—increases the risk for the disease in everyone, including children and teens.
Now recent studies show that a healthy diet may not only prevent depression, but could effectively treat it once it’s started.
The article goes on to compare taking care of the brain's physiological needs, including what we eat, to treat or prevent mental illness in the same way we take care of the heart's physiological needs, including what we eat, to treat or prevent heart disease.
Makes absolute sense when you think about it. At the very least, you'll be protecting yourself against other sorts of illnesses related to diet!