Our Gemara discusses apocalyptic traditions of how the righteous and the wicked will get their due at the end of days:

 

אֵין גֵּיהִנָּם לָעוֹלָם הַבָּא, אֶלָּא הַקָּדוֹשׁ בָּרוּךְ הוּא מוֹצִיא חַמָּה מִנַּרְתִּיקָהּ, צַדִּיקִין מִתְרַפְּאִין בָּהּ וּרְשָׁעִים נִידּוֹנִין בָּה. שֶׁנֶּאֱמַר: ״וְזָרְחָה לָכֶם יִרְאֵי שְׁמִי שֶׁמֶשׁ וְגוֹ׳״. וְלֹא עוֹד, אֶלָּא שֶׁמִּתְעַדְּנִין בָּהּ, שֶׁנֶּאֱמַר: ״וִיצָאתֶם וּפִשְׁתֶּם כְּעֶגְלֵי מַרְבֵּק״.

 

There is no Gehenna in the World-to-Come. Rather, the Holy One, Blessed be He, will remove the sun from its sheath [minartika], and the righteous will be healed by it and the wicked will be punished by it. The righteous will be healed by it, as it is stated: “But to you that fear My name shall the sun of righteousness arise with healing in its wings”; and moreover, not only will they be healed by it but they will even be rejuvenated by it, as it is stated: “And you shall go forth and leap as calves of the stall.”

 

וְהָרְשָׁעִים נִידּוֹנִין בָּהּ, שֶׁנֶּאֱמַר: ״הִנֵּה הַיּוֹם בָּא בֹּעֵר כַּתַּנּוּר וְגוֹ׳״.

 

And the wicked will be punished by the same sun, as it is stated: “For behold, the day is coming, it burns as a furnace; and all the proud, and all that work wickedness, shall be stubble; and the day that comes shall set them ablaze” (Malachi 3:19). 

 

This tradition is making an important theological point.  Gehenom is not a vindictive act to single out and punish the sinners, but rather the very same agency and principle that will bring reward to the righteous, will cause anguish for the wicked.  Exposure to God himself (symbolically, the rays of the Sun,) will heal and bless those who have prepared and elevated themselves to bear His heat and fire, and will incinerate those who have not.

 

Arvei Nachal (Va’era 2:7) expands on this idea.  The reason why we are taught that one can pray for relief before or even after the divine decree (Rosh Hashana 16a) is because, in truth, God does not change anything.  Instead, via repentance, the person changes. The same circumstances have a positive and healing effect instead of a damaging effect.  He notes the word for plague or illness in Hebrew (Nega) is an anagram  of the word for pleasure (oneg).  This is because, as we have seen, metaphysically they are the same.

 

The Shalah (Toldos Adam, Beis Ir Chomah) uses this idea to explain how God appears to “change his Mind”; punishing, rewarding and forgiving . All these interactions with God are about how humans shift in response to His presence. When people behave immorally they are somehow blocking powerful and life-giving forces of God’s presence, and they become toxified by the same forces in the world that could strengthen and heal them. It is similar to the idea that certain substances can be catalyzed and become toxic when exposed to one chemical, while made to be beneficial when exposed to another. The original chemical remains the same.

 

Hoshea (14:10)

כִּֽי־יְשָׁרִ֞ים דַּרְכֵ֣י ה׳ וְצַדִּקִים֙ יֵ֣לְכוּ בָ֔ם וּפֹשְׁעִ֖ים יִכָּ֥שְׁלוּ בָֽם׃

 

For the paths of the LORD are smooth; The righteous can walk on them, While sinners stumble on them. 

 

Psychologically speaking this is also valid. Many so-called mental illnesses or dysfunctional patterns are reactions and defenses against, or in relation to, life. Stubbornness and arrogance will increase dysfunction by leading to defensiveness and lack of growth in response to the demands of outer reality. The inner wishes become such a distorting factor that reality is not engaged with a constructive or adaptive manner, which leads to even more dysfunction.