Also, there is some evidence that Vitamin D supplementation at higher than natural, higher than usually recommended levels is beneficial to mental health (but not sure if the OP article confirms it)
Like most everything around vitamin D, the causality typically is backward. Vitamin D isn't improving these people's mental health, but it turns out that if you have a healthy life that involves ample outdoor activity, you are mentally healthier.
Consider migrant workers, who spend so much time under the hot sun picking veggies, what do their Vitamin D levels and other health metrics look like?