The Alter Rebbe distinguishes between atzvut (depression) and merirut (healthy spiritual bitterness), insisting that true avodah requires pushing aside sadness and accessing joy, since depression is compared to a closed door before the divine light.
וְאַף שֶׁעַצְבוּת הִיא מִצַּד קְלִיפַּת נוֹגַהּ, וְלֹא מִצַּד הַקְּדוּשָּׁה, כִּי בְּצַד הַקְּדוּשָּׁה כְּתִיב: ״עוֹז וְחֶדְוָה בִּמְקוֹמוֹ״, וְ״אֵין הַשְּׁכִינָה שׁוֹרָה אֶלָּא מִתּוֹךְ שִׂמְחָה״ ״וְכֵן לִדְבַר הֲלָכָה וְכוּ׳״, אֶלָּא, שֶׁאִם הָעַצְבוּת הִיא מִמִּילֵּי דִשְׁמַיָּא, הִיא מִבְּחִינַת טוֹב שֶׁבְּנוֹגַהּ. [וְלָכֵן כָּתַב הָאֲרִ״י זִכְרוֹנוֹ לִבְרָכָה, שֶׁאֲפִילוּ דַּאֲגַת הָעֲוֹנוֹת אֵינָהּ רְאוּיָה כִּי אִם בִּשְׁעַת הַוִּידּוּי, וְלֹא בִּשְׁעַת הַתְּפִלָּה וְתַלְמוּד תּוֹרָה, שֶׁצָּרִיךְ לִהְיוֹת בְּשִׂמְחָה שֶׁמִּצַּד הַקְּדוּשָּׁה דַּוְוקָא] וְאַחַר כָּךְ יָבֹא לִידֵי שִׂמְחָה אֲמִיתִּית. דְּהַיְינוּ, שֶׁזֹּאת יָשִׁיב אֶל לִבּוֹ לְנַחֲמוֹ בְּכִפְלַיִים, אַחַר הַדְּבָרִים וְהָאֱמֶת הָאֵלֶּה הַנִּזְכָּרִים לְעֵיל, לֵאמֹר לְלִבּוֹ: ״אֱמֶת הוּא כֵּן בְּלִי סָפֵק, שֶׁאֲנִי רָחוֹק מְאֹד מֵה׳ בְּתַכְלִית, וּמְשׁוּקָּץ וּמְתוֹעָב כוּ׳, אַךְ כָּל זֶה הוּא אֲנִי לְבַדִּי, הוּא הַגּוּף עִם נֶפֶשׁ הַחִיּוּנִית שֶׁבּוֹ, אֲבָל מִכָּל מָקוֹם, יֵשׁ בְּקִרְבִּי ״חֵלֶק ה׳״ מַמָּשׁ, שֶׁיֶּשְׁנוֹ אֲפִילוּ בְּקַל שֶׁבְּקַלִּים, שֶׁהִיא נֶפֶשׁ הָאֱלֹהִית עִם נִיצוֹץ אֱלֹקוּת מַמָּשׁ הַמְלוּבָּשׁ בָּהּ לְהַחֲיוֹתָהּ, רַק שֶׁהִיא בִּבְחִינַת גָּלוּת, וְאִם כֵּן, אַדְּרַבָּה, כָּל מַה שֶּׁאֲנִי בְּתַכְלִית הָרִיחוּק מֵה׳ וְהַתִּיעוּב וְשִׁיקּוּץ הֲרֵי נֶפֶשׁ הָאֱלֹהִית שֶׁבִּי בְּגָלוּת גָּדוֹל יוֹתֵר, וְהָרַחֲמָנוּת עָלֶיהָ גְּדוֹלָה מְאֹד, וְלָזֶה אָשִׂים כָּל מְגַמָּתִי וְחֶפְצִי – לְהוֹצִיאָהּ וּלְהַעֲלוֹתָהּ מִגָּלוּת זֶה, לַהֲשִׁיבָהּ אֶל בֵּית אָבִיהָ כִּנְעוּרֶיהָ, קוֹדֶם שֶׁנִּתְלַבְּשָׁה בְּגוּפִי, שֶׁהָיְתָה נִכְלֶלֶת בְּאוֹרוֹ יִתְבָּרֵךְ וּמְיוּחֶדֶת עִמּוֹ בְּתַכְלִית, וְגַם עַתָּה כֵּן – תְּהֵא כְּלוּלָה וּמְיוּחֶדֶת בּוֹ יִתְבָּרֵךְ, כְּשֶׁאָשִׂים כָּל מְגַמָּתִי בְּתוֹרָה וּמִצְוֹת, לְהַלְבִּישׁ בָּהֶן כָּל עֶשֶׂר בְּחִינוֹתֶיהָ כַּנִּזְכָּר לְעֵיל, וּבִפְרָט בְּמִצְוַת תְּפִלָּה, לִצְעוֹק אֶל ה׳ בַּצַּר לָהּ מִגָּלוּתָהּ בְּגוּפִי הַמְשׁוּקָּץ, לְהוֹצִיאָהּ מִמַּסְגֵּר, וּלְדָבְקָה בּוֹ יִתְבָּרֵךְ״. וְזֹאת תִּהְיֶה עֲבוֹדָתוֹ כָּל יָמָיו בְּשִׂמְחָה רַבָּה, הִיא שִׂמְחַת הַנֶּפֶשׁ בְּצֵאתָהּ מֵהַגּוּף הַמְתוֹעָב, ״וְשָׁבָה אֶל בֵּית אָבִיהָ כִּנְעוּרֶיהָ״, בִּשְׁעַת הַתּוֹרָה וְהָעֲבוֹדָה, וּכְמַאֲמַר רַבּוֹתֵינוּ־זִכְרוֹנָם־לִבְרָכָה: לִהְיוֹת כָּל יָמָיו בִּתְשׁוּבָה. וְאֵין לְךָ שִׂמְחָה גְדוֹלָה כְּצֵאת מֵהַגָּלוּת וְהַשִּׁבְיָה, כִּמְשַׁל בֶּן מֶלֶךְ שֶׁהָיָה בְּשִׁבְיָה וְטוֹחֵן בְּבֵית הָאֲסוּרִים וּמְנֻוָּול בְּאַשְׁפָּה, וְיָצָא לַחָפְשִׁי – אֶל בֵּית אָבִיו הַמֶּלֶךְ.
For although sadness stems from the realm of kelipat nogah and not from that of holiness, since in regard to holiness it is written, “Strength and gladness are in His place,” and “the Divine Presence (Shechinah) abides only in joy…as is the case also in the study of halachah,” and so on, except that if the sadness comes from reflections about celestial [i.e., spiritual] things, it is derived from the realm of goodness that is in nogah [hence the Arizal wrote that even worry about sins is only fitting during confession but not during prayer and Torah study, which should be conducted with joy derived from the side of holiness, exclusively]— Following this he will attain true joy when he will reflect in his heart and gain a double measure of comfort, in view of what has been said above in truth, saying to himself: “Truly and without doubt I am far removed from G–d, and I am abominable and loathsome, and so on. Yet all this is myself alone, that is to say, the body with its vivifying soul. Yet, there is within me a veritable part of G–d, which is found even in the most worthless of the worthless, namely, the divine soul with a spark of veritable G–dliness which is clothed in it and animates it, except that it is, as it were, in [a state of] exile. Therefore, on the contrary, the further I am separated from G–d, and the more contemptible and loathsome, the deeper in exile is my divine soul, and the more greatly is she to be pitied; therefore I shall make it my whole aim and desire to extricate her and liberate her from this exile, in order to return her ‘to her Father’s house as in her youth,’ before she was clothed in my body, when she was absorbed in His light, blessed be He, and completely united with Him. Now she will again be thus absorbed and united with Him, blessed be He, if I will bend my whole aim toward the Torah and the commandments, to clothe therein all her ten faculties, as mentioned above, especially in the precept of prayer, to cry to the L–rd in her distress of exile in my despicable body, to liberate her from her prison, that she may attach herself to Him, blessed be He.” And this shall be his service all his life in great joy, the joy of the soul in her release from the despised body and “returning to her Father’s house as in her youth,” when engaged in Torah and prayer. Indeed, the Rabbis, of blessed memory, have said that one should be in a state of repentance throughout one’s life. For there is no greater joy than the escape from exile and imprisonment, as in the example of the king’s son who was kept in captivity, turning the millstone in prison and becoming covered with filth; then he is liberated and he returns to his father’s royal house.