Proverbs 24:17

בִּנְפֹל אוֹיִבְיךָ אַל תִּשְׂמָח וּבִכָּשְׁלוֹ אַל-יָגֵל לִבֶּךָ

Do not rejoice when your enemy falls and do not let your heart be glad when he stumbles.

The twelfth bracha of Shemoneh Esrei, Birkas HaMinim (against heretics) was composed by Shmuel HaKatan. He is also cited in Pirkei Avos (4:19) for this statement, that we should not take joy in the downfall of our enemies. The Bertinuro explains that even though this dictum is a verse in Mishlei (Proverbs), it is attributed to Shmuel HaKatan by the Mishna because it is the lesson he always tried to impart. (Even though he wrote the prayer for the downfall of heretics, he took no joy in its necessity.)