Our sages have taught, "Whoever gets angry, it is as if he worshipped idols" (Zohar I, 27b). Why? Because at the time of his anger, his faith has left him. For were he to believe that what happened to him was G d’s doing, he would not be angry at all.
Rabbi Schneur Zalman of Liadi (Tanya, Iggeret Hakodesh 25)