Asher Kassel from Rehovot, Israel wrote:
How do we know that the directive to emulate Hashem's attributes is limited only to the so-called "good" attributes of Hashem (the 13 midot)? What about attributes such as anger, vengeance, etc.?
Dear Asher Kassel,
Actually, we are supposed to emulate all of Hashem's attributes. There is a time and place for anger, such as Pinchas's attack on Zimri and Cozbi. There is even a place for revenge, such as Jacob's sons' revenge against Shechem, and the Jewish People's revenge against Midian.
However, these attributes must only be used according to the dictates of halacha. We're not omniscient, so we don't always know all the relevant factors and consequences. Therefore, we need extreme caution and Torah guidance in these matters.