Is getting angry just a bad habit and a poor character trait, or does it cause worse damage? Is anger only a problem if it comes out in aggression, or is a state of rage morally problematic, even if physically kept in check? 

The Gemara in Shabbos (105b) warns:

Rabbi Shimon ben Elazar says in the name of Ḥilfa bar Agra, who said in the name of Rabbi Yoḥanan ben Nuri: One who rends his garments in his anger, or who breaks his vessels in his anger, or who scatters his money in his anger, should be like an idol worshipper in your eyes, as that is the craft of the evil inclination. Today it tells him do this, and tomorrow it tells him do that, until eventually, when he no longer controls himself, it tells him worship idols and he goes and worships idols.

רַבִּי שִׁמְעוֹן בֶּן אֶלְעָזָר אוֹמֵר מִשּׁוּם חִילְפָא בַּר אַגְרָא שֶׁאָמַר מִשּׁוּם רַבִּי יוֹחָנָן בֶּן נוּרִי: הַמְקָרֵע בְּגָדָיו בַּחֲמָתוֹ, וְהַמְשַׁבֵּר כֵּלָיו בַּחֲמָתוֹ, וְהַמְפַזֵּר מְעוֹתָיו בַּחֲמָתוֹ, יְהֵא בְּעֵינֶיךָ כְּעוֹבֵד עֲבוֹדָה זָרָה. שֶׁכָּךְ אוּמָּנוּתוֹ שֶׁל יֵצֶר הָרָע: הַיּוֹם אוֹמֵר לוֹ עֲשֵׂה כָּךְ, וּלְמָחָר אוֹמֵר לוֹ עֲשֵׂה כָּךְ, עַד שֶׁאוֹמֵר לוֹ עֲבוֹד עֲבוֹדָה זָרָה וְהוֹלֵךְ וְעוֹבֵד

The Gemara gives examples of breaking and tearing objects out of anger. It seems that the morally problematic part of anger is taking aggressive action. 

However, Rambam in Hilchos Deos (2:3) disagrees:

Anger an extremely evil tendency and it is proper for man to remove himself from it to the other extreme. One should teach himself not to get angry, even over a matter which befits anger...The sages of yore said: "He who yields to anger is as if he worshiped idolatry".

וְכֵן הַכַּעַס מִדָּה רָעָה הִיא עַד לִמְאֹד וְרָאוּי לָאָדָם שֶׁיִּתְרַחֵק מִמֶּנָּה עַד הַקָּצֶה הָאַחֵר. וִילַמֵּד עַצְמוֹ שֶׁלֹּא יִכְעֹס וַאֲפִלּוּ עַל דָּבָר שֶׁרָאוּי לִכְעֹס עָלָיו...אָמְרוּ חֲכָמִים הָרִאשׁוֹנִים כָּל הַכּוֹעֵס כְּאִלּוּ עוֹבֵד עֲבוֹדַת כּוֹכָבִים.

In the Rambam’s formulation, anger itself is idolatry even without breaking or smashing things. The question is, what is the Rambam’s source?

I believe the source is hidden within our Gemara on amud beis and Rashi’s question:

The Gemara says:

 

⁦Rabbi Mani bar Patish said: Whoever becomes angry, even if greatness has been apportioned to him from heaven, he is lowered from his greatness. From where do we derive this? From Eliab, David’s older brother, as it is stated: “And Eliab’s anger burned against David and he said: Why did you come down, and with whom have you left those few sheep in the wilderness? I know your insolence and the evil of your heart, for you have come down to see the battle” (I Samuel 17:28); we see that Eliab became angry. And when Samuel went to anoint him after God had told him that one of Yishai’s sons was to be the king, concerning all of the other brothers it is written: “The Lord has not chosen this one” (I Samuel 16:8), whereas with regard to Eliab it is written: “And the Lord said to Samuel: Look not at his appearance, nor at the height of his stature, for I have rejected him” (I Samuel 16:7). This proves by inference that until now He had loved him, and it was only at this point that Eliab was rejected. Had it not been for his anger, Eliab would have been fit for greatness; but owing to this shortcoming, God rejected him.

אָמַר רַבִּי מָנִי בַּר פַּטִּישׁ: כׇּל שֶׁכּוֹעֵס, אֲפִילּוּ פּוֹסְקִין עָלָיו גְּדוּלָּה מִן הַשָּׁמַיִם — מוֹרִידִין אוֹתוֹ. מְנָלַן? מֵאֱלִיאָב, שֶׁנֶּאֱמַר: ״וַיִּחַר אַף אֱלִיאָב בְּדָוִד וַיֹּאמֶר לָמָּה [זֶּה] יָרַדְתָּ וְעַל מִי נָטַשְׁתָּ מְעַט הַצֹּאן הָהֵנָּה בַּמִּדְבָּר אֲנִי יָדַעְתִּי אֶת זְדֹנְךָ וְאֵת רוֹעַ לְבָבֶךָ כִּי לְמַעַן רְאוֹת הַמִּלְחָמָה יָרָדְתָּ״. וְכִי אֲזַל שְׁמוּאֵל לְמִמְשְׁחִינְהוּ, בְּכֻלְּהוּ כְּתִיב: ״לֹא בָּזֶה בָחַר ה׳״, וּבֶאֱלִיאָב כְּתִיב: ״וַיֹּאמֶר ה׳ אֶל שְׁמוּאֵל אַל תַּבֵּיט אֶל מַרְאֵהוּ וְאֶל גְּבֹהַּ קוֹמָתוֹ כִּי מְאַסְתִּיהוּ״, מִכְּלָל דַּהֲוָה רָחֵים לֵיהּ עַד הָאִידָּנָא.

 

Rashi (Op. Cit.) asks that there Is a chronological problem with the proof text. True, Elian was rejected. However, the incident of Eliab getting angry actually took place one chapter later and subsequent to Samuel having prophetically chosen David over Eliab. Rashi answers that even though Eliab displayed his anger later, that incident merely was an exemplification of an already established predisposition. 

I would Like to suggest that the Rambam had the same question as Rashi, however he answered it a bit differently. While according to Rashi Eliab already had the predisposition and the evidence of it came from a later incident, Eliab still might have had to act on his anger in some prior way in order to be passed up over David. On the other hand, Rambam might argue that since in point of fact this is the only proof text supplied by the Gemara, we cannot assume that Eliab acted on his anger at any other time prior otherwise scripture should have noted that. Therefore, Eliab’s moral violation was not necessarily any action, but rather having the angry personality and predilection even if he did not yell or scream or break anything. As Rashi learns, the verse from the later incident is the proof text of the personality and tendency. But according to Rambam having the state of mind is already the moral failure without even acting out.

An indication that this Gemara is the source for the Rambam’s halakha instead of the Gemara in Shabbos is that he also references our Gemara’s warning about one who becomes angry will lose his wisdom and prophecy.

There is an additional proof from our Gemara to the Rambam’s position that the angry state of mind is the moral failure not the actual behavior.  Earlier our Gemara also warned that anger causes the prophet to lose prophecy and the wise man to lose wisdom, and brings scriptural evidence from Elisha and Moshe who became angry in certain instances and had lapses in knowledge and prophecy. 

The commentaries wonder why did only Eliab lose his stature and was passed up for leadership, when Moshe and Elisha also became angry and did not become demoted? Various answers are given but I can suggest that the Rambam would say that his position also has a lenient side. Consider a person who generally does not have an angry state of mind or disposition but on one specific instance lost his temper. Perhaps such a person does not deserve to lose his leadership. Rambam could argue that is why Elisha and Moshe suffered temporary losses of prophecy or wisdom but no long lasting effects of demotion. On the other hand, Eliab who didn’t even yet act out his anger was passed over for leadership because of a deeper more flawed disposition of anger.