"..But if he was a married man, his wife shall leave with him." (Ex. 21:3)

...such a person is transformed into the "owner" of its holy soul.

The Torah alludes to a profound mystical element here. There are people who acquire their soul by dint of their good deeds; such a person is transformed into the "owner" of its holy soul. In order to understand this concept one has to learn the Zohar (Vol. III 91 on Lev. 22:27) referring to the Torah discussion that when an ox or sheep is born it is to remain with its mother for seven days before it can be offered on the altar as a sacrifice.

According to the Zohar, animals acquire their intelligence at the moment of birth. (This is why the Torah refers to the ox as "ox" already at birth not as calf, for instance. The animal does not develop its personality, thought it may develop its body. — EM) Animals are different from human beings in this respect. Human beings acquire their souls only in ratio to the good deeds they have performed. The greater the number of good deeds performed by man the higher quality is his soul (or after having been alive at least for one Shabbat) . The soul which such a mitzvah-observant Jew acquires is called "isha" (wife) in our context.

Kabbalists such as the author of Tikunei Zohar (50) describe the soul as isha. The Torah tells us here that if a person has acquired his "wife" i.e. soul, by reason of the performance of good deeds, his wife will remain with him also after death.

Another lesson to be derived from the words "if he was a married man" is that the only person who qualifies for the title "married man" is the one who makes sure that while on earth all his activities are performed for the spiritual advancement of his soul. Solomon alluded to this by describing the eating of a tzadik as "the righteous man eats in order to satisfy his soul;" (Proverbs 13:25) a person who strives to elevate his spiritual nature in such a way may truly be called a 'husband.' After all, it is the duty of a husband to look after all the needs of his wife. If the soul is man's wife, it behooves the husband to look after its needs. When he has done so in the best manner he is capable of he can rest assured that the "wife" does not even abandon him in death.

If the soul is man's wife, it behooves the husband to look after its needs.

The Torah continues in the next verse: "If his master gives him a wife etc." (21:4) This means that if the husband mentioned previously did not acquire his pure soul by means of performing good deeds but was fortunate to have been born with such a soul as a gift from G‑d Himself, and such a wife had born children for him, then both the wife and the children belong to his Master, i.e. to G‑d. The Torah reveals here that some people are indeed fortunate to be born with a righteous soul; this may be due to the fact that the father of such an individual lived a righteous life and "bequeathed" such an inheritance to his offspring. When the Torah speaks of the "children" of such people this is a reference to Bereishit Rabba (30) which describes the principal offspring of the righteous as their meritorious deeds.

Since we have a tradition that each good deed performed creates a good angel known as an advocate; (Avot 4:13) such a good deed is an offspring of the tzadik. The Torah describes these "children" as being born "for him," i.e. the husband. The reason that the Torah distinguishes between sons or daughters is that the good deeds which required a great deal of effort are described as sons, whereas good deeds which did not require a battle with the evil urge before one performed them are described as daughters.

The Torah says that the good deeds performed by such a person who had been endowed with all the advantages by G‑d already at the time of birth, does not retain the "wife and her children.' Rather, the "wife and the children" will belong to her Master (G‑d) as distinct from the good deeds of the person who was not bequeathed a pure soul by his father, the tzadik. This son of the righteous father did not refine his body by means of his good deeds so that his soul will not depart from him after his death. As a result, his soul returns to G‑d when his body dies.

...he will recapture the status he enjoyed while he lived on earth.

"..whereas he leaves (dies) alone."

Although such a person had been separated from "his wife and children" while in the grave, when the time comes for him to be resurrected, i.e. to leave his grave, he will find that those merits he had acquired during his lifetime on earth will once again stand him in good stead, i.e. he will recapture the status he enjoyed while he lived on earth. He will not forfeit resurrection because he had not been born without a pure soul.

"If the slave declares 'I love my Master, my wife and my children' etc." (Ex. 21:5)

The Torah here describes the eagerness of the Jew (slave) to serve his Master (G‑d) even after his physical powers have diminished (after he has turned 60 as we mentioned earlier). This is why the Torah describes him as saying: "I love my Master, my wife and my children." The latter are his soul and the good deeds the "slave" has performed in this world. He does not wish to leave this world as it enables him to accumulate further merits. Seeing that death makes him free, i.e. unable to accumulate more merits, he shuns death. The Torah promises this type of individual that he will indeed be called a true servant of the L-rd. G‑d will eventually fulfill his desire but not at this stage.

[From "Ohr Hachayim" by Rabbi Chayim ben Attar, translated and annotated by Eliyahu Munk, Vol. II]