This teaching is found in “Shocher Tov” on the 47th perek of “Tehillim”, with slightly different wording.
 The relevant p’sukim that are quoted in this Midrash, state as follows:
“A hymn by the sons of Korach: All of the nations, listen to this, all of the inhabitants of the world, pay attention [to this]. Also the sons of Adam – Avraham, also the sons of Ish – Noach, both wealthy and poor [should listen what I shall relate]. My mouth shall speak [words of] wisdom, and the thoughts of my heart are [matters of] understanding. I shall incline my ear to the parable, I shall open my riddle with [a] harp.” (Tehillim: 49; 1 – 5) (See RaSh”I’s commentary on “Adam” and “Ish” (49; 3), as well as Metzudas David who comments on “understanding” as referring to “matters of understanding”.)
 The entire pasuk reads, “And the light is sweet, and it is good for the eyes to see the sun.” (Koheles: 11; 7)
Targum Yonasan ben Uziel explains that “The light of The Torah is sweet, and it is good for lighting up darkened eyes to see The Glory of The Countenance of The Shechinah, which, in the future will light up the faces of the righteous from The Brightness of The Shechinah, and that their beauty will shine like the sun”.
 The entire pasuk states, “So shall all of Your enemies be destroyed, HaShem, and those who He loves are like the sun rising in its strength, and the Land [of Israel] was tranquil for forty years.” (Shoftim: 5; 31)
Targum Yonasan ben Uziel states, “Just as [was the case with] Sisra, so too shall all of the enemies of The Nation of HaShem be destroyed, and those righteous whom He loves shall shine in the future like The Radiance of His Presence, [it being] 343 times [brighter than] the sun when it rises in its strength, and The Land of Israel was quiet from making war for forty years”.
 The entire pasuk reads, “For a mitzvah is a candle, and Torah is light, and the path of life is the rebukes of musar.” (Mishlei: 6; 23)
 The Midrash brings this pasuk from parshas “VaEschanan” to demonstrate that the word “זאת” – “zos” – “this”, which is quoted in the passage from sefer “Tehillim”, refers to The Torah. The relevant phrase from “Tehillim” is “שמעו-זאת כל-העמים...” – “All of the nations, listen to this…” (49; 2), while the pasuk from “VaEschanan” states, “וזאת התורה אשר-שם משה לפני בני ישראל” – “And this is The Torah that Moshe placed before The B’nei Yisrael.” (Divarim: 4; 4)
 The Midrash expounds from the pasuk in “Tehillim”, based on the double-meaning of the word “חלד” – “Earth” or “rust”, that “all of the inhabitants of the Earth” can alternatively be read as “all of the inhabitants of rust”, that referring to all of those who reside in gehinnom, they being those who raise up its rust.
 The pasuk from sefer “Yihoshua” reads, “And the previous name of Chevron [was] Kiryat Arba, he being the great man – Adam – “אדם” – among giants, and The Land was tranquil from war.” (Yihoshua: 14; 15)
RaSh”I comments that the man – Adam – in this pasuk, is Avraham.
 The entire pasuk reads, “These are the generations of Noach, Noach is a righteous man – “Ish” – he was upright in his generations, Noach walked with G-d.” (B’reishis: 6; 9)
 The mishna in Perek “Chelek” in maseches “Sanhedrin” (90a) teaches that there are three kings and four “ordinary” people who didn’t receive a portion in The World to Come. Two of these people are Doeg and Achitofel, who were both great in their knowledge of The Torah. Achitofel had been King David’s advisor, but had sided with Avshalom in his rebellion against King David. (Shmuel II: Chapters 15 – 17) When King David and his men were in exile from the monarchy, Achitofel advised Avshalom to pursue David’s men with 12,000 soldiers, weary them out, and then kill David. (Shmuel II: 17; 2 – Metzudas David) HaShem caused it to be that Avshalom would reject Achitofel’s advice, in order to bring punishment upon Avshalom. (17; 14) Once Achitofel saw that his advice was rejected, he committed suicide through strangulation. (17; 23) Perhaps Achitofel could have performed teshuvah if he wouldn’t have committed suicide. Achitofel’s death by strangulation occurred in fulfillment of David’s curse directed against him at the time when the water of the t’hom was rising and threatening David. David said that anyone who knows how to stop the water and is silent would die by strangulation, which applied to Achitofel. (Sukkah, 53a – b) David’s curse came true, but if not for Achitofel’s haughtiness in not allowing himself to perform teshuvah, perhaps somehow the curse wouldn’t have applied to him in such a way. Doeg spoke Lashon HaRa against David to Shaul and led to eighty-five kohanim being wiped out, as well as Nov the city of kohanim, and further encouraged Shaul to pursue David. (Shmuel I: 22; 9 – 19)
The gemara in maseches “Sanhedrin” (106b), quoting Rabbi Yochanan, notes that though Doeg lived in the time of Shaul and Achitofel lived in David’s time, they didn’t see each other as each of them, due to their great sins, lived very short lives; Doeg lived for thirty-four years and Achitofel lived for thirty-three years.