With the recent surge in fad diets, vegan trends, paleo movements, clean eating, raw food, and gluten free products (even bottled water that's certified gluten free... umm), it's not uncommon for people on these diets to become nutrient deficient. Although deficiencies can appear innocuous, even going unnoticed at first, they often present themselves further down the road as insidious mental and physical illnesses. Not trivially, many of the nutrients that are commonly missing in today's diets are those that are crucial to hormone and neurotransmitter production, particularly serotonin (plays a role in mood, sexual desire, sleep, and memory) and dopamine (primary role in pleasure and pain). Recent studies indicate that foods containing particular nutrients may be used to therapeutically treat depression among other physical ailments.
One study looked at the elimination of gluten from the diet in patients with Celiac Disease (a severe intolerance to gluten — the protein found in wheat, rye and barley) and found that is was associated with an 80% increased risk of depression. Clearly, Celiac's is a medical condition that necessitates gluten avoidance, but oftentimes people who choose to be on gluten free diets miss out on a significant portion of their carbohydrate intake.
Forming the precursor to serotonin (i.e. containing the amino acid Tryptophan), carbohydrates play a critical role in mood stability and depression susceptibility. Other foods that serve as precursors to serotonin - including milk products, egg, red meat, fish, and poultry — also happen to be the main food groups eliminated in vegetarian and vegan diets. Common nutrient deficiencies associated with popular diet trends also include Vitamins B12 and Folate, which are both needed in the brain to synthesize serotonin and dopamine.
Low folate levels are also linked to a poor response to antidepressants, and treatment with folic acid (synthetic version of folate) has been shown to improve responses to antidepressants. Moreover, suffering from depression can often worsen the nutritional quality of one's diet (whether that's undereating, overeating, limiting the variety of food groups consumed etc.), fueling a vicious cycle of increased depressive symptoms and declining nutrition. What's encouraging about this relationship between nutrition and mood is the possibilities for treatment. Because the mechanisms by which vitamin B12 and folate influence gene expression are continuous and reversible, nutritional therapies have the potential to be a legitimate contender for effective therapy.
Now for a little taste (pun intended) of the nitty gritty nutritional biochemistry. Vitamin B12 and folate enable a process called one-carbon metabolism which produces a compound known as SAM (S-adenosyl methionine- which, by the way is found in almost every tissue of your body). By transferring methyl groups to and from genes that have neurological function (I.e. neurotransmitter production) this molecular system is critical for regulation of gene expression that influence our mood and susceptibility to neurological imbalances.
Bear in mind though, nutritional intervention isn't a cure-all, and may not be as effective for some as it is for others. Factors other than nutrition come into play here: family history, traumatic experiences, medication side effects, activity level, among others. But on a whole, the evidence seems to show that a lot more of your health outcomes are in our hands rather than in those of our predetermined genetics. You never know, boning up on your nutritional needs may be what you need to get you out of that rut.