Another interpretation of "נדחי ישראל יכנס" [Rejected Israel will enter] is referring to the tribes, as it says in Deuteronomy 29:27 "He has cast them into another land." Similarly, the verse in Isaiah 27:13 says "and those who were lost will come." At that moment, Israel has no pain until they are healed, as it says, "The doctor for broken hearts." The Holy One, blessed be He said, "If his hand is afflicted, the broken heart of Israel is healed all the more so."
Their heart will not be broken except for the destruction of Jerusalem, as it says in Lamentations 5:17 "For this our heart has become faint." The Holy One, blessed be He said, "Why?" They said to Him, "For the mountain of Zion that is desolate." He said to them, "Behold, I weep and heal you," as it says, "The doctor for broken hearts."
And it is written in Isaiah 30:26, "On the day that the Lord binds up the wound of His people," referring to the brokenness caused by the destruction of Jerusalem. Just as the one who destroyed it will rebuild it, at that time there will be no distress, no sighing, and no mourning, as it says in Isaiah 51:11, "Joy and gladness will overtake them, and sorrow and sighing will flee away." And they will rejoice forever.