Reb Levi Yitzchak of Berditchev teaches that the soul's journey involves inevitable descents (yeridot) as part of its ascents (aliyot) — sometimes a person falls into profound spiritual and emotional darkness not from sin but as preparation for a higher elevation. This provides a redemptive framework for understanding depressive episodes.
עוד יבואר, אלה תולדות נח נח איש צדיק תמים היה בדורותיו את האלהים התהלך נח. נקדים תחלה לבאר פירוש רש"י על פסוק ויבא נח אל התיבה מפני מי המבול, פירוש אף נח מקטני אמנה היה. וצריך להבין זה הפירוש הלא הכתוב מעיד לעיל ויעש נח כאשר צוה ה', ועשה התיבה כמו שפקד ה' עליו משמע שהאמין בה' ואחר כך פירש רש"י אף נח מקטני אמנה היה. אך נבא לבאר בעזרת השם יתברך, כי ידוע כי כל נצוצין הקדושים יש להם תשוקה לעבוד הבורא ברוך הוא כמו המלאכים ושרפי הקודש משתוקקים לעשות רצון הבורא באימה וביראה אך צריך להבין לפעמים יש להצדיק תאות הגשמיות לממון או לשאר תאות עולם הזה מאין בא הדבר הזה להצדיק להיות מתאוה להגשמיות כי צדיק אין לו תאוה רק להיות עובד הבורא מהיכן בא זה להצדיק למחשבת תאוה כזה. אך נבוא לבאר כי הצדיק מחמת שהוא עובד הבורא ומחזיר אחר הרשעים גם כן להיותם מעובדי הבורא ברוך הוא ומוכיח אותם להכניס אותם תחת כנפי השכינה ומכח זה שהם מגביהים את הרשעים לעשות רצון קונם צריך הצדיק ללחום מלחמות מצוה עם החיצונים לברר הנצוצות שנפלו בקליפה עד הנה על ידי מעשה הרשעים שהיו עושים והצדיק מעלה אותם לקדושה ומזה באה להצדיק מחשבת תאות עולם הזה: וזה פירוש המשנה (חגיגה פ"ג מ"א) חומר בקודש מבתרומה, רצה לומר המשנה מקשה חומר בקודש מהיכן הוא בא דבר זה חומריות לקודש רצה לומר להצדיק שהוא עובד הבורא ואין לו רק תשוקה להיות עובד הבורא ברוך הוא מהיכן בא להצדיק דבר חומריות. ותירץ מבתרומה, רצה לומר מכח זה שמגביה הרשע להיות עובד הבורא בא להצדיק מחשבה רעה של גשמיות של הרשע שתרומה לשון הגבהה הוא שמטבילין כלי בתוך כלי לתרומה אבל לא לקודש. הכלל הוא, כל דבר שיש בעולם הזה צריך האדם ליקח ממנו דרך לעבודת הבורא, דהיינו כשמתאוה לדבר גשמי כגון לממון או לכבוד אז צריך האדם לישב עצמו מה זה התאוה שאני מתאוה לגשמי זה הגשמי דבר נפסד וכלה הוא אבל עבדות הבורא זה דבר עולמית ושם אצל הבורא יש כל התענוגים כי הוא מקור כל הנבראים. וזה הוא עיקר תכלית כל הנבראים רק לעבוד הבורא ברוך הוא ולעשות תענוג להבורא כמו שאמרו חכמינו ז"ל (אבות ו, ט) כל מה שברא הקדוש ברוך הוא לא ברא אלא לכבודו, לעשות נחת רוח להבורא ברוך הוא:
Still another facet of the line:אלה תולדות נח, נח איש צדיק, תמים היה בדורותיו, may be appreciated by the reader after we have “digested” Rashi’s commentary on Genesis 7,7 ויבא נח..... אל התבה מפני מי המבול, “Noach (and family) entered the ark on account of the waters of the deluge.” Rashi uses this verse to state that Noach was deficient in his faith in G’d. [Rashi based himself on Bereshit Rabbah 32,6 who explains the extraneous words: “on account of the waters of the deluge,” as telling us that Noach did not enter the ark until the rising waters of the flood made this unavoidable.”] This exegesis appears to fly in the face of an explicit verse in Genesis 6,22 according to which Noach carried out every single one of G’d’s instructions without exception. How could the author of the Midrash accuse Noach of being lacking in faith? If someone spent 120 years building an ark, anticipating a deluge, because G’d had told him to do so, how can this be interpreted as “lack of faith?”We must bear in mind that all the holy “sparks” are possessed of an urge to serve their Creator, just as do the different categories of angels all of whom vie to fulfill the wishes of their Creator while being in awe of Him. The tzaddik, being a mortal human being and burdened with an evil urge within him, may not always serve his master with a similar degree of single-mindedness. He may be sidetracked by thinking of money, or the allure of secular attractions, including good-tasting fruit, etc. One of the causes distracting the tzaddik from serving his Creator with the same degree of single-mindedness as the angels is that in order to bring the sinners closer to G’d, he must first befriend them. The sinners are sinners because the have within them some of the 288 sparks that “fell off” the Shechinah, as we explained on page 21. [A רשע, sinner, who too has been created in the image of G’d, contains within him some of these sparks, though they have become tainted through their close association with the sinner. Ed.] In the process of “outreaching,” as it is commonly known in our time, the exposure of the highest ranking type of tzaddik to the lure of secularism is such that he may momentarily forget his true calling, feeling drawn to these “perks” of olam hazeh, as advertised by Satan in eye-catching colors. A tzaddik engaged in such activities may be viewed as being engaged in a מלחמת מצוה, “a holy war,” on behalf of his Creator. This idea is alluded to in the wording in Chagigah 3:1. The Mishnah there discussing different degrees of holiness, i.e. that קדשים, sacred parts of sacrificial animals, have a higher degree of holiness than t’rumah, the portion of the farmer’s harvest that has to be given to the priest. An example given by the Mishnah illustrating this is that whereas two vessels which require ritual purification through immersion in a ritual bath may be cleansed even when one of them is inside the other, this ruling is not valid when the vessels in question belong to a higher level of holiness known as קדשים, vessels used in handling the remains of sacrificial animals, for instance. Apparently, the author of this Mishnah relates the rules pertaining to cleansing vessels that have become ritually impure to their respective origins. In other words: the holier one’s origin, the more stringent the rules for recapturing one’s purity once it had been lost. The wording of the Mishnah, i.e.חומר בקודש מבתרומה , can be understood allegorically as: “the reason why higher ranking holiness is subject to more stringent steps of purification than lower ranking holy vessels, is because the higher ranking ones had been inside the lower ranking ones.” The word תרומה chosen by the Mishnah, has a double meaning, i.e. it is something in need of being elevated further. Applied to the צדיק in our parable, it means that the tzaddik engaged in “outreach,” must be much more on guard against being drawn into the sphere of the sinner than the kind of tzaddik who does not venture to mix with the sinners even in order to bring them closer to G’d. A tzaddik faced with this dilemma will do well to remind himself that the allures of this world are transient, and cannot be compared to the delights in store when the soul rejoins its place in heaven after having successfully discharged its duties while within a mortal body. When our sages in Avot 6,10 stated that everything that G’d created, He created only for the sake of His glory, this is another way of saying that He desires to have satisfaction from the conduct of His creatures.