The wicked is overthrown through his evildoing, but the righteous finds refuge in his death.
#proverbs 14:32 ESV
Some translations say that the righteous find hope in knowing that the wicked eventually die. It's not that we should rejoice in the death of the wicked, but in the fact that their death ends their wickedness.