There are various causes of depression
When we look at the world around us, we see much that grieves us. In many situations, our grief must be overcome by "the joy of performing a mitzvah"; mitzvah - that is, not only by means of gladness and joy, but through the understanding that the grief itself is the point of departure for progress, for the realization of God's commandments by Israel. For this is the very thing Israel is called to do: to bring the divine light into the world through the realization of the commandments.
That is, the soul ceases to see and distinguish the divine light; the person is mired in the material realm.
The lifting of the soul to higher worlds is the realization of the commandment to return (teshuvah). In Rav Kook's teachings, as explained in Orot haTeshuvah, teshuvah is not only a matter of rectification of misdeeds, but also elevation of the world to a higher spiritual level. Since in the process of its creation the world has been moving away from God, it must return to God; thus, global teshuvah is the original commandment - to lift the entire world nearer to God. Return of the individual's soul from the "exile" of materialism is also a form of teshuvah.
In other words, pure spirituality, by itself, unconnected to material realization, is not "full-blooded": it is pure - but pale and impotent. Although it is distressing when the soul descends into lower, material worlds, it gains fullness and completion there, it becomes emotionally and existentially richer, and, on its return to the sublime level, it is enriched. This is what comprises joy. Today's descent of the soul is the basis for its future ascent, which will bring it to a more sophisticated level. We should find joy in the awareness of the future ascent of our soul, and of the whole world with it.
Additional note on the connection between this paragraph and the preceding one
When the older approaches to Torah study (which failed to provide a sense of connection between the parts and the whole) cease to be effective, the soul, both individual and national, plunges into the darkness of materialism; in this lower region it is at least able to observe the link between specifics and general values. The individual and social bodies both wish for material pleasures, and they immerse themselves in these; the soul contemplates this and is distressed. This distress must be overcome not by rejecting materialism, but through an understanding that this descent is historically necessary (and although one need not contribute to it, one must recognize that the world is so ordered), and through the joy of realizing that in the future, with the help of a more full-blooded life, we will rise to a yet higher level. (It is important to note that we are speaking here not of a descent into sin by the breaking of commandments, but of the descent into materialism by grasping for worldly pleasures.) All of this applies, of course, both to the individual and the nation.