Sefer Chasidim Siman 138
Can copy this into an AI, or connect the whole library to your assistant. For deeper learning, you can directly use the original seforim, sites, and apps.
בכל דרכיו של אדם יראה היאך יעשה מצוה בין בשחוק בין בכעסו. איך יתכן למשה לשבר את הלוחות הכתובים באצבע אלהים אלא לתקנת ישראל עשה אמר מוטב שאהיה חייב ואל יהו כל ישראל חייבים וכיון שחרה אפו לשם שמים הסכים עמו הקב"ה ואמר לו יישר כחך ששברת:
In all of a man’s ways he should look to perform the meritorious deed in both joy and anger; else how is it right for Moses to break the tablets written with the finger of God if not for the correction of Israel. He said, “Better that I be guilty rather than all the Israelites be guilty.”¹ ed. Horeb, Exodus, Chapter XLIII, p. 100. Since he became angry for the sake of heaven, the Holy One, blessed be He, agreed with him and said to him, “May your strength be firm for having broken them.”²
footnotes: ¹ Midrash Rabbah, ² Shabbath 87a.