“I would now even have killed you and let her live” (Bamidbar 22:33)
Rashi and Rabbeinu Bechaya discuss why Hashem would have killed the donkey.
Rabbeinu Bechaya says that this donkey would have been the “talk of the town” (pun intended) to the point that the citizens would have attributed his supernatural power of speech to the donkey itself, making it into a deity. Hashem would have had to kill the donkey in order to make it clear to all that the miracle was from Hashem.
Rashi offers a different explanation, and tells us that Hashem meant: “I would have had to kill the donkey, for everyone would say ‘this is the donkey that bested Bilaam. This “great” prophet could not even stand up to the lowly creature of the donkey.” While Bilaam deserved a punishment, this particular putdown of Bilaam was more than he deserved. As Hashem will not punish anyone more than they deserve, He would have had to kill the donkey to keep the punishment in check.
Rashi parallels this to a woman who had relations with an animal: The animal is also killed in this case to prevent the woman from being embarrassed, as people would say “this is the animal that caused this woman to die.”
I think the lesson of Chazal is quite striking. You can have a prophet who is a despicable man, hedging his way to fight with Hashem, a man full of greed for money, lust for sensual pleasures, and an insatiable hatred for klal Yisrael. Yet Hashem is careful not to embarrass him more than he deserves. The strength that I draw from such a message is that no matter how far removed we are from Hashem, He still loves us, and is looking for a way to give us a fare deal. Hashem loves every Jew far more than the best of Gentiles, certainly more than Bilaam harasha!
Therefore, whenever we have difficulties in life, we must firmly believe that these difficulties are exactly our fare share, and not one iota more.