Rambam explains biblical anthropomorphic language and the use of terms like anger as metaphors for divine action, not literal emotion in God. This is useful for how classical Judaism understands anger-language when applied to the Divine and by extension human beings.
ובכל עת שתושג פעולה מפעולותיו, יתואר הוא יתעלה בתואר שאותה פעולה יוצאת ממנו, וייקרא בשם הנגזר מאותה פעולה. לדוגמה: כשמושגת עדינות הנהגתו בהתהוות העובר, ויצירת כוחות בו ובמי שמגדל אותו לאחר לידתו, המונעים אותו מן המוות והאובדן ושומרים אותו מכל פגע, ומועילים לו בהתנהלותו ההכרחית – ופעולה כגון זו אצלנו לא תצא אלא לאחר היפעלות ורוך, והוא עניין הרחמים – נאמר עליו יתעלה 'רחום', כמו שנאמר "כְּרַחֵם אָב עַל בָּנִים [רִחַם ה' עַל יְרֵאָיו]" (תהילים קג,יג), ונאמר "וְחָמַלְתִּי עֲלֵיהֶם כַּאֲשֶׁר יַחְמֹל אִישׁ עַל בְּנוֹ" (מלאכי ג,יז). לא שהוא יתעלה נפעל ורך, אלא כדוגמת אותה פעולה שיצאה מן האב על הילד, שהיא תוצאה של רוך וחמלה והיפעלות בלבד, יצא ממנו יתעלה כלפי הקרובים לו לא כתוצאה מהיפעלות או שינוי. וכמו שכאשר אנו מעניקים משהו למי שאיננו חייבים לו, נקרא זה בלשוננו "חנינה", כמו שנאמר "חָנּוּנוּ אוֹתָם" (שופטים כא,כב), "אֲשֶׁר חָנַן אֱלֹהִים" (בראשית לג,ה), "כִּי חַנַּנִי אֱלֹהִים" (שם שם,יא) וכיוצא באלו הרבה. והוא יתעלה יוצר ומנהיג את מי שאינו חייב ליצור ולהנהיג אותו, ולכן נקרא 'חנון'. 8 וכן נמצא בפעולותיו היוצאות על בני האדם פגעים גדולים הנוחתים על אי אלו אנשים ומשמידים אותם, או פגע מקיף (מילולית: "עניין כללי") המכלה שבטים ואף אזורים שלמים, ונספים הבנים והנכדים ולא נשארים להם צאצאים, כמו שקיעות הקרקעות ורעידות האדמה והברקים הקטלניים, וכמו יציאת עם אחד כנגד אחרים להשמידם בחרב ולמחות את זכרם, ופעולות רבות כאלה שאינן יוצאות ממישהו מתוכנו אלא כתוצאה מכעס גדול או טינה עצומה או בקשת נקמת דם. ונקרא לפי פעולות אלו 'קנוא' ו'נוקם' ו'נוטר' ו'בעל חמה'. כלומר הפעולות שדוגמתן יוצאות מתוכנו כתוצאה מתכונה נפשית כמו קנאה או שאיפה לנקמת דם או שנאה או כעס, יוצאות ממנו יתעלה לפי מה שהתחייבו אלה שנענשו, ובשום אופן לא מהיפעלות שלו, יתעלה מכל חסרון. וכך הפעולות כולן הן פעולות הדומות לפעולות היוצאות מבני האדם כתוצאה מהיפעלות ותכונה נפשית, והן יוצאות ממנו יתעלה, ולא משום דבר נוסף על עצמותו. מנהיג המדינה ההולך בעקבות דרכי ה' 9 וראוי למנהיג המדינה, אם הוא נביא, שיידמה באותם תארים, ויצאו ממנו אותן פעולות בשיקול וכפי הדין, לא מתוך היפעלות בלבד. ולא יתיר את רצועת הכעס ולא יאפשר את ההיפעלויות אצלו, משום שכל היפעלות היא רעה. אלא יישמר מהן כפי יכולת האדם, ויהיה לעתים וכלפי חלק מהאנשים רחום וחנון, לא מרוך וחמלה בלבד אלא כפי הראוי; ויהיה לעתים וכלפי חלק מהאנשים נוקם ונוטר ובעל חמה כפי הראוי להם ולא רק מתוך כעס, עד שיצווה לשרוף אדם מבלי שהוא כועס עליו ולא רוגז עליו ולא שונא אותו, אלא כפי מה שייראה לו מן הדין. ויכוון לתועלת הגדולה שתיגרם מן הפעולה הזו בציבור הרחב.
Whenever any one of His actions is perceived by us, we ascribe to God that emotion which is the source of the act when performed by ourselves, and call Him by an epithet which is formed from the verb expressing that emotion. We see, e.g., how well He provides for the life of the embryo of living beings; how He endows with certain faculties both the embryo itself and those who have to rear it after its birth, in order that it may be protected from death and destruction, guarded against all harm, and assisted in the performance of all that is required [for its development]. Similar acts, when performed by us, are due to a certain emotion and tenderness called mercy and pity. God is, therefore, said to be merciful: e.g., “Like as a father is merciful to his children, so the Lord is merciful to them that fear Him” (Ps. 103:13); “And I will spare them, as a man spareth (yaḥamol) his own son that serveth him” (Mal. 3:17). Such instances do not imply that God is influenced by a feeling of mercy, but that acts similar to those which a father performs for his son, out of pity, mercy and real affection, emanate from God solely for the benefit of His pious men, and are by no means the result of any impression or change—[produced in God].—When we give something to a person who has no claim upon us, we perform an act of grace; e.g., “Grant them graciously unto us” (Judges 21:22). [The same term is used in reference to God, e.g.] “which God hath graciously given” (Gen. 33:5); “Because God hath dealt graciously with me” (ib. 11). Instances of this kind are numerous. God creates and guides beings who have no claim upon Him to be created and guided by Him; He is therefore called gracious (ḥannun)—His actions towards mankind also include great calamities, which overtake individuals and bring death to them, or affect whole families and even entire regions, spread death, destroy generation after generation, and spare nothing whatsoever. Hence there occur inundations, earthquakes, destructive storms, expeditions of one nation against the other for the sake of destroying it with the sword and blotting out its memory, and many other evils of the same kind. Whenever such evils are caused by us to any person, they originate in great anger, violent jealousy, or a desire for revenge. God is therefore called, because of these acts, “jealous,” “revengeful,” “wrathful,” and “keeping anger” (Nah. 1:2) that is to say, He performs acts similar to those which, when performed by us, originate in certain psychical dispositions, in jealousy, desire for retaliation, revenge, or anger: they are in accordance with the guilt of those who are to be punished, and not the result of any emotion: for He is above all defect! The same is the case with all divine acts: though resembling those acts which emanate from our passions and psychical dispositions, they are not due to anything superadded to His essence. The governor of a country, if he is a prophet, should conform to these attributes. Acts [of punishment] must be performed by him moderately and in accordance with justice, not merely as an outlet of his passion. He must not let loose his anger, nor allow his passion to overcome him: for all passions are bad, and they must be guarded against as far as it lies in man’s power. At times and towards some persons he must be merciful and gracious, not only from motives of mercy and compassion, but according to their merits: at other times and towards other persons he must evince anger, revenge, and wrath in proportion to their guilt, but not from motives of passion. He must be able to condemn a person to death by fire without anger, passion, or loathing against him, and must exclusively be guided by what he perceives of the guilt of the person, and by a sense of the great benefit which a large number will derive from such a sentence.