The 2nd example brought by the Talmud in tractate Megilla 10b, concerning the downfall of the wicked, namely, Divrei Hayamim/II Chron. XX, 21, also should be understood as G-d not being happy with the downfall of the wicked of Israel. I will now try to explain this in depth.
Divrei Hayamim/II Chronicles chapter 20 informs us that during the reign of the righteous king Yehoshafat, Amon and Moav (Moab) had gathered a strong army together in order to expel the Jews from their country. Yehoshafat called for a public fast and urged his fellow Jews to repent with the hope that this would also gain him support from G-d to solve the problem.
A prophet informed Yehoshafat that the Jews would indeed be saved without even having to fight. He also told the Jews in what area the enemy soldiers would suffer their defeat. Yehoshafat's people, unlike the religious leftists of our days said, it is fitting to say Hallel while G-d is bringing the miraculous downfall of our enemies, so in verse 19 they start to say Hallel, (prayers of thanks and praise) and verse 22 makes it clear that the Hallel prayer was being said right at the time that the enemy was starting to fall, namely, as the enemy decided to fight among themselves.
But although they were saying Hallel over the downfall of their enemies, in verse 21, we learn that they were saying it in a slightly flawed way. They said, "Give thanks unto the L-rd, for his mercy endureth for ever", instead of saying the more complete praise, Give thanks unto the L-rd, for he is good (alt. translation for it is good), for his mercy endureth for ever". It is from this omission that Rabbi Yochanan concludes, that G-d is not happy with the downfall of the wicked, which is why the children of Israel omitted for he is good (alt. translation for it is good) from their Hallel.
The question arises, the downfall of which wicked people, caused the children of Israel to say a flawed Hallel? Some Bible interpreters mistakenly think it was the downfall of Moav and Ammon that were attempting to expel the Jews from their land that caused Israel to say a flawed version of Hallel. However, the more logical explanation as Yehoshua Rosenberg points out, is that the flawed Hallel was a result of the distress of the Jews, because until the enemy was defeated, there was always the chance that some of the wicked of Israel might be harmed before the final victory. The distress of Israel over the potential danger from the enemy to harm some of the Jewish people, according to Rabbi Yochanan, resulted in a flawed Hallel prayer. This was similar to the situation of the night of Yom Suf, where the ministering angels did not sing their songs of praise at all, because at that time the wicked of Israel were in danger of receiving a similar punishment to the one befalling the enemy.
Further indication that we are not sad at all about the downfall of our non-Jewish enemies comes later in the Talmud in tractate Megilla which records a conversation between Mordechai and Haman, when Haman was forced to give royal honor to Mordechai and was publicly humiliated by Mordechai. Haman at that time complained to Mordechai that he was violating the Biblical verse in the book of Mishlei/Proverbs 24:17, "when your enemy falls do not rejoice". Mordechai answered back, that the verse applies to an enemy who is part of the Jewish people, but against you (and your type), the verse of Dvarim/Deut. 33:29 is applicable.
Furthermore, if Moshe (Moses) and Bnei Yisrael (the children of Israel) sang praises to G-d about the drowning of the Egyptians in the sea, it would also indicate that this is nothing to feel sad about. Furthermore, the Bible states outright in Tehillim/Pslams 58: "The righteous shall rejoice when he sees vengeance".