Every transgression is a form of idolatry.
At times, this is clear-cut, and at others, murky.
At times, a transgression results from conscious rebellion.
At other times, from a spirit of folly that persuades a person that what he is doing is not quite idolatrous, that he remains a good Jew still attached to sanctity.
If one were to experience, in its full poignancy and clarity, the truth of "I am the Lord your God" and "You shall not have any other gods,” one would never be able to sin.
This truth is expressed in the statement of the sages that "when a person grows angry, it is as though he is worshiping idols.”
An angry person, like any other transgressor, has established his ego as the determining factor of reality: "I want!" "I deserve!"
We face a choice between ourselves and God.
Either "I have created myself," and I do all that my heart desires, or God is the Creator and King of the Universe, and I connect to Him, knowing that I cannot disengage myself from Him at any time and under any circumstances.
–Rabbi Adin Steinsaltz
From Learning from the Tanya by Rabbi Adin Steinsaltz