Adopted from “Four Chassidic Masters” by Rabbi Dr. Abraham Twerski (p. 174):
A man once told the Tzaddik of Sanz that someone had undercut him in business and caused him to lose a great deal of money. The man was very angry and said that he would retaliate. The Tzaddik told him that the Torah forbids taking revenge.
Tha man said, “That does not apply in this case. This person is a rasha and it is a mitzvah to bury him.”
The Tzaddik said, “That is incorrect. The Midrash says the Jews in Egypt were bereft of mitzvos, so Hashem gave them the two mitzvos of korban Pesach and milah. By performing these two miracles they would merit the miracles of the Exodus.
“However, Rashi says that the plague of three days of darkness came about because some Jews were reshaim and died because they did not wish to leave Egypt. Hashem inflicted three days of total darkness, so that the Egyptians would not see the Jews being buried [Shmos 10:22].
“In that case, why does the Midrash state that the Jews were bereft of Mitzvos? The buried the reshaim, didn’t they? Obviously,” the Tzaddik said, “burying a rasha is not a mitzvah.”