The Basis of Humility
The key to improving one's character, and in particular to reducing one's tendency to get angry and irritated, is the recognition of one's own existential lowliness.
To be sure, the basis of all Divine service is the recognition of one's own self-worth. Every Jew possesses a unique Divine soul, complete with a full array of the most sublime and noble capacities of intellect and emotion, and this fact itself endows him with inestimable potential and worth.
However, greatness carries with it expectations, and thus the very awareness of our own great worth paradoxically makes us painfully aware of how dismally we have betrayed it. In fact, the more one becomes attuned to and appreciates the exaltedness of his Divine soul, the more his own self-estimation plummets when measured against the record of his faithfulness to it.
King David epitomized this humility. When chastised by his wife Michal for seeming to demean the office of the king by publicly dancing before the ark of the covenant, he said, "I am [and shall always remain] lowly in my own eyes" (Samuel 2 6:22).
One's essential shame before G-d is that the vast majority of his thoughts and sensations in life are void of Divine consciousness. Jewish faith affirms that "there is no space void of Him" (Tikunei Zohar 57 [91b]), "space" meaning not only physical space, but psychological "space" as well (See Sod Hashem Lireiav, ch. 3). Every thought and sensation occupies "space" in one's consciousness. It is our purpose on earth to fill all such "space" with the awareness of G-d's omnipresence. When we fail to do this, we stand before G-d as a vessel empty of G-dliness, and thereby full of shame, for just as nature abhors a vacuum, the mind cannot remain empty. If it is not filled with holy thoughts, it will by default be filled with unholy ones.
On the verse "And the pit was empty, void of water" (Genesis 37:24), our sages comment(Shabbat 22a): "being void of water, it was filled with snakes and scorpions."
The Source of Happiness
When one is aware of his own lowliness, he no longer makes demands on others or expects to receive anything from them; he knows that he deserves nothing. This applies to one's relationship to G-d, as well. To the extent one cultivates true humility, he will consider all the infinite goodness G-d showers upon him throughout life to be undeserved (As is stated in Psalms 16:2, "You do not owe me the goodness that I receive.").
This humility was exemplified by the patriarch Jacob. When he was about to confront his brother Esau after having fled from him for thirty-four years, he prayed to G-d for protection, saying, "I have been humbled by all the lovingkindness and truth which You have done with your servant" (Genesis 32:11). He felt that whatever merits he might have possessed had been more than exhausted by the infinite kindnesses G-d had bestowed upon him already. The Torah states that this attitude is intrinsic to the Jewish people: the more goodness they receive, the humbler they become ("You are the least of all peoples" [Deuteronomy 7:7]–for you [by your very nature] are continually diminishing yourselves, as did Abraham when he said ?For I am dust and ashes' [Genesis 28:27], and as did Moses and Aaron, who said ?what are we?' [Exodus 16:7]…" [Rashi ad loc.]). In contrast, one characteristic of an evil person is that success and prosperity inflate his ego, since his self-reinforcing conceit convinces him that all his accomplishments and fortune are due to his own efforts or merits (See Tanya, Igeret HaKodesh 2).
Conversely, when seemingly bad things happen, the lowly person will immediately assume full responsibility, and assume that G-d is causing him to suffer in order to effect atonement for his sins (See Tanya, Igeret HaTeshuvah, ch. 11).
Releasing all one's demands on G-d and man on the one hand, and accepting full blame for misfortune on the other, spare one the pain of being hurt or offended in life. Anger and depression result from the frustration generated by the belief that one really deserves better in this world and his assumed right to gratification is being infringed. Proper attitudes, in contrast, enable one to be sincerely and continuously happy and optimistic.
True and Illusory Humility
The humility we have just described contrasts sharply with the unfortunately common psychological pitfalls of self-deprecation and low self-image. These result from desensitization to spirituality, in which one loses his connection or identity with his Divine soul or allows it to become weakened. The less one identifies with his Divine soul, the more he focuses on his animal nature, which he correctly perceives as a complex labyrinth of base urges and drives. When this happens, a deep, underlying depression will underpin his consciousness, and inevitably lend a subtle sense of desperation to everyday life, which may on occasion surface and manifest itself in various ways.
The obvious cure for a ruined self-esteem, then, is to simply redouble one's efforts to spiritualize his life and realign his consciousness with his Divine soul.
The cultivation of proper self-esteem balanced by proper humility from the Torah perspective is one of the main challenges parents face in raising and educating their children. To a lesser but nonetheless significant extent, friends, business associates, and of course, spouses, can also both undermine or reinforce and repair one's proper, positive self-image and sense of humility.
In view of the importance of humility in one's relationships both to his fellow man and to G-d, it is clearly essential to cultivate it continuously.
With regard to marriage: when there is conflict between husband and wife, each should consider themselves the primary cause of the difficulty, as said above. If this does not suffice to resolve the problem, one's next thought should be: "What makes me think that I by right deserve to be treated any better than this?" One should remember that everything that is his is an undeserved gift from G-d, and that this includes his spouse and children, along with all his material and spiritual possessions.