The Tanya's twenty-sixth chapter opens with one of its most practical teachings: you cannot fight the evil inclination if you are depressed. Spiritual warfare requires joy.

Rabbi Schneur Zalman compares the inner battle to a wrestling match. If one of the wrestlers is sluggish and heavy-hearted, he will be thrown easily, even if he is physically stronger. The same applies to the war between the divine soul and the animal soul. Sadness—atzvut (עצבות)—makes a person dull, slow, and incapable of spiritual effort. It is the enemy's best weapon.

But the Tanya does not reject sadness entirely. It says that "in every sadness there is profit" (Proverbs 14:23)—but the profit is not the sadness itself. It is the joy that comes after. The right kind of anguish—genuine bitterness over one's distance from God—can break through the "iron wall" of the sitra achara and create an opening for the divine light. The Tanya cites (Psalms 51:19): "A broken and a contrite heart, God, You will not disdain." This breaking of the heart, done at the right time and in the right way, leads directly to the joy described in the preceding verse: "Restore to me the joy of Your deliverance."

This is why the Arizal—Rabbi Yitzchak Luria, the great 16th-century Kabbalist of Safed—placed the recitation of (Psalms 51) after the midnight Tikkun (spiritual repair) Chatzot prayer, before beginning Torah study. First, break the heart with genuine remorse. Then, study Torah with the joy that emerges from that brokenness. The light that comes from darkness is superior to light that has never known darkness.

The Tanya's practical advice: set aside specific times for examining your spiritual condition and feeling genuine anguish about your failures. But do not bring that anguish into prayer or Torah study. Those activities demand joy. Sadness has its appointed hour. Outside that hour, it is the enemy.