Jewish Identity in the End of Days
(א) וְהָיָה֩ כִֽי־יָבֹ֨אוּ עָלֶ֜יךָ כָּל־הַדְּבָרִ֣ים הָאֵ֗לֶּה הַבְּרָכָה֙ וְהַקְּלָלָ֔ה אֲשֶׁ֥ר נָתַ֖תִּי לְפָנֶ֑יךָ וַהֲשֵׁבֹתָ֙ אֶל־לְבָבֶ֔ךָ בְּכָל־הַגּוֹיִ֔ם אֲשֶׁ֧ר הִדִּיחֲךָ֛ יְהוָ֥ה אֱלֹהֶ֖יךָ שָֽׁמָּה׃ (ב) וְשַׁבְתָּ֞ עַד־יְהוָ֤ה אֱלֹהֶ֙יךָ֙ וְשָׁמַעְתָּ֣ בְקֹל֔וֹ כְּכֹ֛ל אֲשֶׁר־אָנֹכִ֥י מְצַוְּךָ֖ הַיּ֑וֹם אַתָּ֣ה וּבָנֶ֔יךָ בְּכָל־לְבָבְךָ֖ וּבְכָל־נַפְשֶֽׁךָ׃ (ג) וְשָׁ֨ב יְהוָ֧ה אֱלֹהֶ֛יךָ אֶת־שְׁבוּתְךָ֖ וְרִחֲמֶ֑ךָ וְשָׁ֗ב וְקִבֶּצְךָ֙ מִכָּל־הָ֣עַמִּ֔ים אֲשֶׁ֧ר הֱפִֽיצְךָ֛ יְהוָ֥ה אֱלֹהֶ֖יךָ שָֽׁמָּה׃ (ד) אִם־יִהְיֶ֥ה נִֽדַּחֲךָ֖ בִּקְצֵ֣ה הַשָּׁמָ֑יִם מִשָּׁ֗ם יְקַבֶּצְךָ֙ יְהוָ֣ה אֱלֹהֶ֔יךָ וּמִשָּׁ֖ם יִקָּחֶֽךָ׃ (ה) וֶהֱבִֽיאֲךָ֞ יְהוָ֣ה אֱלֹהֶ֗יךָ אֶל־הָאָ֛רֶץ אֲשֶׁר־יָרְשׁ֥וּ אֲבֹתֶ֖יךָ וִֽירִשְׁתָּ֑הּ וְהֵיטִֽבְךָ֥ וְהִרְבְּךָ֖ מֵאֲבֹתֶֽיךָ׃ (ו) וּמָ֨ל יְהוָ֧ה אֱלֹהֶ֛יךָ אֶת־לְבָבְךָ֖ וְאֶת־לְבַ֣ב זַרְעֶ֑ךָ לְאַהֲבָ֞ה אֶת־יְהוָ֧ה אֱלֹהֶ֛יךָ בְּכָל־לְבָבְךָ֥ וּבְכָל־נַפְשְׁךָ֖ לְמַ֥עַן חַיֶּֽיךָ׃
(1) When all these things befall you—the blessing and the curse that I have set before you—and you take them to heart amidst the various nations to which the LORD your God has banished you, (2) and you return to the LORD your God, and you and your children heed His command with all your heart and soul, just as I enjoin upon you this day, (3) then the LORD your God will restore your fortunes and take you back in love. He will bring you together again from all the peoples where the LORD your God has scattered you. (4) Even if your outcasts are at the ends of the world, from there the LORD your God will gather you, from there He will fetch you. (5) And the LORD your God will bring you to the land that your fathers possessed, and you shall possess it; and He will make you more prosperous and more numerous than your fathers. (6) Then the LORD your God will open up your heart and the hearts of your offspring to love the LORD your God with all your heart and soul, in order that you may live.
(יא) כִּ֚י הַמִּצְוָ֣ה הַזֹּ֔את אֲשֶׁ֛ר אָנֹכִ֥י מְצַוְּךָ֖ הַיּ֑וֹם לֹֽא־נִפְלֵ֥את הִוא֙ מִמְּךָ֔ וְלֹ֥א רְחֹקָ֖ה הִֽוא׃ (יב) לֹ֥א בַשָּׁמַ֖יִם הִ֑וא לֵאמֹ֗ר מִ֣י יַעֲלֶה־לָּ֤נוּ הַשָּׁמַ֙יְמָה֙ וְיִקָּחֶ֣הָ לָּ֔נוּ וְיַשְׁמִעֵ֥נוּ אֹתָ֖הּ וְנַעֲשֶֽׂנָּה׃ (יג) וְלֹֽא־מֵעֵ֥בֶר לַיָּ֖ם הִ֑וא לֵאמֹ֗ר מִ֣י יַעֲבָר־לָ֜נוּ אֶל־עֵ֤בֶר הַיָּם֙ וְיִקָּחֶ֣הָ לָּ֔נוּ וְיַשְׁמִעֵ֥נוּ אֹתָ֖הּ וְנַעֲשֶֽׂנָּה׃ (יד) כִּֽי־קָר֥וֹב אֵלֶ֛יךָ הַדָּבָ֖ר מְאֹ֑ד בְּפִ֥יךָ וּבִֽלְבָבְךָ֖ לַעֲשֹׂתֽוֹ׃ (ס)
(11) Surely, this Instruction which I enjoin upon you this day is not too baffling for you, nor is it beyond reach. (12) It is not in the heavens, that you should say, “Who among us can go up to the heavens and get it for us and impart it to us, that we may observe it?” (13) Neither is it beyond the sea, that you should say, “Who among us can cross to the other side of the sea and get it for us and impart it to us, that we may observe it?” (14) No, the thing is very close to you, in your mouth and in your heart, to observe it.

רמב"ן ויקרא כו:טז

ודע והבן כי האלות האלה ירמזו לגלות ראשון... וגם לא אמר שישובו בתשובה שלימה לפניו, רק שיתודו עונם ועון אבותם (פסוק מ)... אבל הברית שבמשנה תורה ירמז לגלותנו זה ולגאולה שנגאל ממנו. כי הסתכלנו תחילה שלא נרמז שם קץ וקצב ולא הבטיח בגאולה, רק תלה אותה בתשובה... והגאולה בברית ההיא השנית, גאולה שלמה מעולה על כלם.

Ramban Vayikra 26:16

Know and understand that these curses are referring to the first exile… and it does not say that they will return with a complete teshuvah before Him, only that they will confess their sins and the sins of their fathers (verse 40)… But the covenant in mishneh Torah (Devarim) hints to our exile and the redemption in which we will be redeemed from it. For we see that no end has been hinted at nor a time for redemption promised, rather it has been made dependent on teshuvah…

(ט) וַיֹּ֣אמֶר נְחֶמְיָ֣ה ה֣וּא הַתִּרְשָׁ֡תָא וְעֶזְרָ֣א הַכֹּהֵ֣ן ׀ הַסֹּפֵ֡ר וְהַלְוִיִּם֩ הַמְּבִינִ֨ים אֶת־הָעָ֜ם לְכָל־הָעָ֗ם הַיּ֤וֹם קָדֹֽשׁ־הוּא֙ לַיהוָ֣ה אֱלֹהֵיכֶ֔ם אַל־תִּֽתְאַבְּל֖וּ וְאַל־תִּבְכּ֑וּ כִּ֤י בוֹכִים֙ כָּל־הָעָ֔ם כְּשָׁמְעָ֖ם אֶת־דִּבְרֵ֥י הַתּוֹרָֽה׃ (י) וַיֹּ֣אמֶר לָהֶ֡ם לְכוּ֩ אִכְל֨וּ מַשְׁמַנִּ֜ים וּשְׁת֣וּ מַֽמְתַקִּ֗ים וְשִׁלְח֤וּ מָנוֹת֙ לְאֵ֣ין נָכ֣וֹן ל֔וֹ כִּֽי־קָד֥וֹשׁ הַיּ֖וֹם לַאֲדֹנֵ֑ינוּ וְאַל־תֵּ֣עָצֵ֔בוּ כִּֽי־חֶדְוַ֥ת יְהוָ֖ה הִ֥יא מָֽעֻזְּכֶֽם׃
(9) Nehemiah the Tirshatha, Ezra the priest and scribe, and the Levites who were explaining to the people said to all the people, “This day is holy to the LORD your God: you must not mourn or weep,” for all the people were weeping as they listened to the words of the Teaching. (10) He further said to them, “Go, eat choice foods and drink sweet drinks and send portions to whoever has nothing prepared, for the day is holy to our Lord. Do not be sad, for your rejoicing in the LORD is the source of your strength.”
(א) וּכְכַלּ֣וֹת אֵ֗לֶּה נִגְּשׁ֨וּ אֵלַ֤י הַשָּׂרִים֙ לֵאמֹ֔ר לֹֽא־נִבְדְּל֞וּ הָעָ֤ם יִשְׂרָאֵל֙ וְהַכֹּהֲנִ֣ים וְהַלְוִיִּ֔ם מֵעַמֵּ֖י הָאֲרָצ֑וֹת כְּ֠תוֹעֲבֹֽתֵיהֶם לַכְּנַעֲנִ֨י הַחִתִּ֜י הַפְּרִזִּ֣י הַיְבוּסִ֗י הָֽעַמֹּנִי֙ הַמֹּ֣אָבִ֔י הַמִּצְרִ֖י וְהָאֱמֹרִֽי׃ (ב) כִּֽי־נָשְׂא֣וּ מִבְּנֹֽתֵיהֶ֗ם לָהֶם֙ וְלִבְנֵיהֶ֔ם וְהִתְעָֽרְבוּ֙ זֶ֣רַע הַקֹּ֔דֶשׁ בְּעַמֵּ֖י הָאֲרָצ֑וֹת וְיַ֧ד הַשָּׂרִ֣ים וְהַסְּגָנִ֗ים הָֽיְתָ֛ה בַּמַּ֥עַל הַזֶּ֖ה רִאשׁוֹנָֽה׃ (ס) (ג) וּכְשָׁמְעִי֙ אֶת־הַדָּבָ֣ר הַזֶּ֔ה קָרַ֥עְתִּי אֶת־בִּגְדִ֖י וּמְעִילִ֑י וָאֶמְרְטָ֞ה מִשְּׂעַ֤ר רֹאשִׁי֙ וּזְקָנִ֔י וָאֵשְׁבָ֖ה מְשׁוֹמֵֽם׃
(1) When this was over, the officers approached me, saying, “The people of Israel and the priests and Levites have not separated themselves from the peoples of the land whose abhorrent practices are like those of the Canaanites, the Hittites, the Perizzites, the Jebusites, the Ammonites, the Moabites, the Egyptians, and the Amorites. (2) They have taken their daughters as wives for themselves and for their sons, so that the holy seed has become intermingled with the peoples of the land; and it is the officers and prefects who have taken the lead in this trespass.” (3) When I heard this, I rent my garment and robe, I tore hair out of my head and beard, and I sat desolate.
(ב) וַיַּעַן֩ שְׁכַנְיָ֨ה בֶן־יְחִיאֵ֜ל מִבְּנֵ֤י עולם [עֵילָם֙] וַיֹּ֣אמֶר לְעֶזְרָ֔א אֲנַ֙חְנוּ֙ מָעַ֣לְנוּ בֵאלֹהֵ֔ינוּ וַנֹּ֛שֶׁב נָשִׁ֥ים נָכְרִיּ֖וֹת מֵעַמֵּ֣י הָאָ֑רֶץ וְעַתָּ֛ה יֵשׁ־מִקְוֶ֥ה לְיִשְׂרָאֵ֖ל עַל־זֹֽאת׃ (ג) וְעַתָּ֣ה נִֽכְרָת־בְּרִ֣ית לֵ֠אלֹהֵינוּ לְהוֹצִ֨יא כָל־נָשִׁ֜ים וְהַנּוֹלָ֤ד מֵהֶם֙ בַּעֲצַ֣ת אֲדֹנָ֔י וְהַחֲרֵדִ֖ים בְּמִצְוַ֣ת אֱלֹהֵ֑ינוּ וְכַתּוֹרָ֖ה יֵעָשֶֽׂה׃ (ד) ק֛וּם כִּֽי־עָלֶ֥יךָ הַדָּבָ֖ר וַאֲנַ֣חְנוּ עִמָּ֑ךְ חֲזַ֖ק וַעֲשֵֽׂה׃ (פ)
(2) Then Shecaniah son of Jehiel of the family of Elam spoke up and said to Ezra, “We have trespassed against our God by bringing into our homes foreign women from the peoples of the land; but there is still hope for Israel despite this. (3) Now then, let us make a covenant with our God to expel all these women and those who have been born to them, in accordance with the bidding of the Lord and of all who are concerned over the commandment of our God, and let the Teaching be obeyed. (4) Take action, for the responsibility is yours and we are with you. Act with resolve!”

(ה) כָּל הַנְּבִיאִים כֻּלָּן צִוּוּ עַל הַתְּשׁוּבָה וְאֵין יִשְׂרָאֵל נִגְאָלִין אֶלָּא בִּתְשׁוּבָה. וּכְבָר הִבְטִיחָה תּוֹרָה שֶׁסּוֹף יִשְׂרָאֵל לַעֲשׂוֹת תְּשׁוּבָה בְּסוֹף גָּלוּתָן וּמִיָּד הֵן נִגְאָלִין שֶׁנֶּאֱמַר (דברים ל א) "וְהָיָה כִי יָבֹאוּ עָלֶיךָ כָּל הַדְּבָרִים" וְגוֹ' (דברים ל ב) "וְשַׁבְתָּ עַד ה' אֱלֹהֶיךָ" (דברים ל ג) "וְשָׁב ה' אֱלֹהֶיךָ" וְגוֹ':

(5) All of the prophets commanded concerning repentance; Israel will only be redeemed by repentance. Indeed, the Torah assured us that in the end, at the close of the period of exile Israel will turn to repentance and be momentarily redeemed...

(ט) ושבת עד ד' אלודיך וכו'. , שע"י קידוש השי"ת יבוא לדרך התשובה, וזה והשבות אל לבבך כי אהבת ישראל חקוק בלבבו ושומע את אשר חרות על לבבו מהר סיני ויזכר מחשבתו ואז ושבת עד ד' אלודיך, כי אחרי אשר ישוב אל עמו בטח ישוב אל אלודיו וישוב מכסלו ורפא לו...

That on account of the Holiness of God's name, people will be brought to repentance. This is the "Return to your heart", because the love of the Jewish people is ingrained on their heart, and this was originally from Mount Sinai and they will remember this thought and then they will return to Hashem, because after that they return to His people, they are guaranteed to return to Hashem as well...