Seven things were created before the world was created: the Torah, repentance, the Garden of Eden, Gehinnom, the Throne of Glory and the Temple, and the name of the Messiah. The Torah, from where? As it says, "The LORD acquired me as the beginning of His way" (Proverbs 8:22). Repentance, from where? As it says, "Before the mountains were brought forth... and You said, Return, O children of man" (Psalms 90:2-3). The Garden of Eden, from where? As it says, "And the LORD God planted a garden in Eden in the east" (Genesis 2:8). Gehinnom, from where? As it says, "For Tophet is ordained from of old" (Isaiah 30:33). The Throne of Glory and the Temple, from where? As it says, "A throne of glory on high from the beginning is the place of our Sanctuary" (Jeremiah 17:12). The name of the Messiah, from where? As it says, "Before the sun, his name shall be continued" (Psalms 72:17).
The Seven Things Created Before the World Was Made
Yalkut Shimoni on Torah 20:16
שִׁבְעָה דְּבָרִים נִבְרְאוּ קֹדֶם שֶׁנִּבְרָא הָעוֹלָם, תּוֹרָה, מִנַּיִן, שֶׁנֶּאֱמַר (משלי ח, כב) "ה' קָנָנִי רֵאשִׁית דַּרְכּוֹ" תְּשׁוּבָה, מִנַּיִן, שֶׁנֶּאֱמַר "בְּטֶרֶם הָרִים יוּלָדוּ" וְגוֹ' "וַתֹּאמֶר שׁוּבוּ בְּנֵי אָדָם", גַּן עֵדֶן מִנַּיִן, שֶׁנֶּאֱמַר וַיִּטַּע ה' אֱלֹהִים גַּן בְּעֵדֶן מִקֶּדֶם גֵּיהִנֹּם, מִנַּיִן, שֶׁנֶּאֱמַר (ישעיה ל, לג) "עָרוּךְ מֵאֶתְמוֹל תָּפְתֶּה" כִּסֵּא הַכָּבוֹד וּבֵית הַמִּקְדָּשׁ מִנַּיִן, שֶׁנֶּאֱמַר "כִּסֵּא כָּבוֹד מָרוֹם מֵרִאשׁוֹן מְקוֹם מִקְדָּשֵׁנוּ" שְׁמוֹ שֶׁל מָשִׁיחַ מִנַּיִן, שֶׁנֶּאֱמַר (תהלים עב, יז) "לִפְנֵי שֶׁמֶשׁ יִנּוֹן שְׁמוֹ".