(לט) אַ֡ךְ בַּחֲמִשָּׁה֩ עָשָׂ֨ר י֜וֹם לַחֹ֣דֶשׁ הַשְּׁבִיעִ֗י בְּאָסְפְּכֶם֙ אֶת־תְּבוּאַ֣ת הָאָ֔רֶץ תָּחֹ֥גּוּ אֶת־חַג־יְהוָ֖ה שִׁבְעַ֣ת יָמִ֑ים בַּיּ֤וֹם הָֽרִאשׁוֹן֙ שַׁבָּת֔וֹן וּבַיּ֥וֹם הַשְּׁמִינִ֖י שַׁבָּתֽוֹן׃ (מ) וּלְקַחְתֶּ֨ם לָכֶ֜ם בַּיּ֣וֹם הָרִאשׁ֗וֹן פְּרִ֨י עֵ֤ץ הָדָר֙ כַּפֹּ֣ת תְּמָרִ֔ים וַעֲנַ֥ף עֵץ־עָבֹ֖ת וְעַרְבֵי־נָ֑חַל וּשְׂמַחְתֶּ֗ם לִפְנֵ֛י יְהוָ֥ה אֱלֹהֵיכֶ֖ם שִׁבְעַ֥ת יָמִֽים׃
(39) Mark, on the fifteenth day of the seventh month, when you have gathered in the yield of your land, you shall observe the festival of Adonai [to last] seven days: a complete rest on the first day, and a complete rest on the eighth day. (40) On the first day you shall take the product of hadar trees, branches of palm trees, boughs of leafy trees, and willows of the brook, and you shall rejoice before Adonai your God seven days.
(יט) שְׁמוּאֵל הַקָּטָן אוֹמֵר, (משלי כד) בִּנְפֹל אוֹיִבְךָ אַל תִּשְׂמָח וּבִכָּשְׁלוֹ אַל יָגֵל לִבֶּךָ, פֶּן יִרְאֶה ה' וְרַע בְּעֵינָיו וְהֵשִׁיב מֵעָלָיו אַפּוֹ:
(19) Shmuel Hakatan said: “If your enemy falls, do not exult; if he trips, let your heart not rejoice, lest the Lord see it and be displeased, and avert his wrath from him” (Proverbs 24:17).
(9) The impious man destroys his neighbor through speech, But through their knowledge the righteous are rescued. (10) When the righteous prosper the city exults; When the wicked perish there are shouts of joy.
(יא) אֱמֹ֨ר אֲלֵיהֶ֜ם חַי־אָ֣נִי ׀ נְאֻ֣ם ׀ אֲדֹנָ֣י יְהוִ֗ה אִם־אֶחְפֹּץ֙ בְּמ֣וֹת הָרָשָׁ֔ע כִּ֣י אִם־בְּשׁ֥וּב רָשָׁ֛ע מִדַּרְכּ֖וֹ וְחָיָ֑ה
(11) Say to them: As I live—declares GOD—it is not My desire that the wicked shall die, but that the wicked turn from [evil] ways and live.
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.
But does God get to rejoice in the misfortune of God's enemies?
Rabbi Shai Held
The ideal and the best case scenario is for the wicked man who is ill to have both his body healed and his soul transformed. When that seems impossible (say, because the person in question has a truly intractable personality disorder), then I think it best to pray that Hashem do whatever Hashem deems necessary to prevent the wicked person from enacting his wicked plans, or from (further) damaging and endangering others. We should not dictate to Hashem the means of salvation Hashem will use; we should only pray for the salvation and leave those decisions in God's hands.
(12) The wicked man schemes against the righteous, and gnashes his teeth at him. (13) The Lord laughs at him, for He knows that his day will come. (14) The wicked draw their swords, bend their bows, to bring down the lowly and needy, to slaughter upright men. (15) Their swords shall pierce their own hearts, and their bows shall be broken. (16) Better the little that the righteous man has than the great abundance of the wicked. (17) For the arms of the wicked shall be broken, but God is the support of the righteous. (18) God is concerned for the needs of the blameless; their portion lasts forever; (19) they shall not come to grief in bad times; in famine, they shall eat their fill. (20) But the wicked shall perish, and the enemies of God shall be consumed, like meadow grass consumed in smoke. (21) The wicked man borrows and does not repay; the righteous is generous and keeps giving.
But also? People sometimes have emotional responses to things, and they need to work their way through our systems.
Rabbi Shimon ben Elazar said: Do not try to appease your friend during his hour of anger; Nor comfort him at the hour while his dead still lies before him; Nor question him at the hour of his vow; Nor strive to see him in the hour of his disgrace.