Chazal discuss how divine providence and prayer can operate even in situations of apparent failure or spiritual distance. The passage is often used in discussions of family merit and the possibility of return.
הָנְהוּ בִּרְיוֹנֵי דַּהֲווֹ בְּשִׁבָבוּתֵיהּ דְּרַבִּי מֵאִיר וַהֲווֹ קָא מְצַעֲרוּ לֵיהּ טוּבָא. הֲוָה קָא בָּעֵי רַבִּי מֵאִיר רַחֲמֵי עִלָּוַיְהוּ כִּי הֵיכִי דְּלֵימוּתוּ. אָמְרָה לֵיהּ בְּרוּרְיָא דְּבֵיתְהוּ: מַאי דַּעְתָּךְ — מִשּׁוּם דִּכְתִיב ״יִתַּמּוּ חַטָּאִים״, מִי כְּתִיב ״חוֹטְאִים״? ״חַטָּאִים״ כְּתִיב. וְעוֹד, שְׁפֵיל לְסֵיפֵיהּ דִּקְרָא ״וּרְשָׁעִים עוֹד אֵינָם״, כֵּיוָן דְּ״יִתַּמּוּ חַטָּאִים״ ״וּרְשָׁעִים עוֹד אֵינָם״? אֶלָּא בְּעִי רַחֲמֵי עִלָּוַיְהוּ דְּלַהְדְּרוּ בִּתְשׁוּבָה, ״וּרְשָׁעִים עוֹד אֵינָם״. בְּעָא רַחֲמֵי עִלָּוַיְהוּ, וַהֲדַרוּ בִּתְשׁוּבָה.
With regard to the statement of Rabbi Yehuda, son of Rabbi Shimon ben Pazi, that David did not say Halleluya until he saw the downfall of the wicked, the Gemara relates: There were these hooligans in Rabbi Meir’s neighborhood who caused him a great deal of anguish. Rabbi Meir prayed for God to have mercy on them, that they should die. Rabbi Meir’s wife, Berurya, said to him: What is your thinking? On what basis do you pray for the death of these hooligans? Do you base yourself on the verse, as it is written: “Let sins cease from the land” (Psalms 104:35), which you interpret to mean that the world would be better if the wicked were destroyed? But is it written, let sinners cease?” Let sins cease, is written. One should pray for an end to their transgressions, not for the demise of the transgressors themselves. Moreover, go to the end of the verse, where it says: “And the wicked will be no more.” If, as you suggest, transgressions shall cease refers to the demise of the evildoers, how is it possible that the wicked will be no more, i.e., that they will no longer be evil? Rather, pray for God to have mercy on them, that they should repent, as if they repent, then the wicked will be no more, as they will have repented. Rabbi Meir saw that Berurya was correct and he prayed for God to have mercy on them, and they repented.