"Do not gloat when your enemy falls; when they stumble, do not let your heart rejoice." (Proverbs 24:17)
By wisdom a house is built, and through understanding it is established; through knowledge its rooms are filled with rare and beautiful treasures. If you falter in a time of trouble, how small is your strength. Rescue those being led away to death; hold back those staggering toward slaughter. Do not gloat when your enemy falls; when they stumble, do not let your heart rejoice, or the LORD will see and disapprove and turn his wrath away from them. Do not fret because of evildoers or be envious of the wicked, for the evildoer has no future hope, and the lamp of the wicked will be snuffed out. Fear the LORD and the king; do not join with rebellious officials, for those two will send sudden destruction on them.
The Catechism identifies the prohibition against rejoicing over an enemy's downfall as part of the law of love that extends even to enemies - the enemy's suffering is never an occasion for satisfaction (CCC 1933).
Brothers and sisters, do not gloat when your enemy falls. The prohibition is not only about the external action of gloating but about the internal condition of the heart: do not let your heart rejoice. The inner satisfaction at another's ruin is as real and as prohibited as the external display. Guard the heart against the secret gloating that the face may not show.
Lord God, guard our hearts against the gloating that rejoices in our enemy's downfall. Give us the love that mourns even when justice falls on those who have wronged us. Through Christ our Lord. Amen.