In the United States an 42% (aprox) of adults have a vitamin D deficiency. Signs and Symptoms often include bone and muscle pain, depression, irritability, sadness, anxiety, fatigue, poor sleep quality, poor immune response, and even hair loss. The good news is vitamin D can be supplemented safely ( 800 IU a day is a good starting point) and cheaply, also sun exposure helps with this but may be harder for some people due to work schedules or various social pressures.
10-30% of adults in developed countries may have a magnesium deficiency. Magnesium deficiency can affect a variety of different bodily functions but it is also being found to be linked to some treatment resistant depressions. In studies done in the same populations that would be recommended for ketamine treatment, magnesium supplementation (magnesium glycinate is often the best tolerated) some participants experienced an improved mood in as little as 7 days in ways that were not explained by placebo effect.
We often think of mental health as a separate thing from physical health but they are the same thing. The brain is just an organ (a complicated one for sure) and like any other organ it relies on you to give it the proper nutrition and resources to maintain a homeostatic state. If minerals improving mood seems like a reach to you, please consider the fact that Lithium deficiency plays a role in bipolar and many other mood disorders and often is prescribed to help treat these disorders.
Every emotion, every feeling, every thought, every mood, every craving and anything in between is the result of two neurons communicating through a wide range of carefully balanced hormones and electrical signals, if anything is out of whack everything will be out of whack.
Apologies for the laziness in citations. Listed below are some of the studies I pulled from as well as years of general education in the field of mental health and substance use.
Edit: Some changes that were pointed out by helpful comments
DiNicolantonio JJ, O’Keefe JH, Wilson WSubclinical magnesium deficiency: a principal driver of cardiovascular disease and a public health crisisOpen Heart 2018;5:e000668. doi: 10.1136/openhrt-2017-000668
Sizar O, Khare S, Goyal A, et al. Vitamin D Deficiency. [Updated 2023 Jul 17]. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2024 Jan-. Available from: https://www.ncbi.nlm.nih.gov/books/NBK532266/
Naeem Z. Vitamin d deficiency- an ignored epidemic. Int J Health Sci (Qassim). 2010 Jan;4(1):V-VI. PMID: 21475519; PMCID: PMC3068797.
https://ods.od.nih.gov/factsheets/VitaminD-HealthProfessional/
Eby GA, Eby KL. Rapid recovery from major depression using magnesium treatment. Med Hypotheses. 2006;67(2):362-70. doi: 10.1016/j.mehy.2006.01.047. Epub 2006 Mar 20. PMID: 16542786.
Eby GA 3rd, Eby KL. Magnesium for treatment-resistant depression: a review and hypothesis. Med Hypotheses. 2010 Apr;74(4):649-60. doi: 10.1016/j.mehy.2009.10.051. Epub 2009 Nov 27. PMID: 19944540.