From Rabbi Chayim Vital’s Gates of Holiness:
3. There are four main Evil attributes [associated with the four Foundations – Fire, Wind, Water and Earth] that we can embody: 1 - arrogance [associated with Fire] and the anger that always come with it; 2 - useless chatter [associated with Wind]; 3 - desires for material pleasures [associated with Water]; and 4 - sadness [associated with Earth]. All four come from the four Husks - the Evil Urge - that is part of our lower soul.
Their opposites are the four main Good attributes that are drawn from the four Good Foundations that are also in the lower soul: 1 - humility, which is the utmost of selflessness and distance from all types of anger that come from arrogance; 2 - silence, being like a mute person and not opening one’s mouth except to deal with Torah and mitzvot, or what is necessary for maintaining one’s body, or for the need to respect all creatures; 3 - slighting all bodily pleasures and avoiding unnecessary excesses; and 4 - being always happy with one’s portion - because everything that is given to us from Heaven is ultimately for the Good. Another aspect of this is being enthusiastic and utterly joyous in serving our Maker.
Thus, when the Evil attributes are consistently in a person, they prevent him from observing Torah and mitzvot - and even if he observes them, it will be not for the sake of Heaven… When a person is strong enough to overpower his Evil Urge - fighting it and removing from himself these Evil attributes - observing the Torah and the mitzvot through toil and effort, such a person is called ‘an impeccable tzadik who fears Heaven’, or ‘a strong person who overcomes his urges’.
And when one becomes accustomed to this way of being, more and more habituated in this way, one can remove from oneself all the Evil attributes completely. In such a state where one’s lower soul does not desire them at all, the Good attributes can be acquired as second nature - so that there is no need to fight with the Evil Urge at all - because his body and lower soul [his mind] are clean and free of all material dross… Then the four letters of the Name YHWH dwell in this person and he becomes a holy throne - a Divine Merkava - and is called ‘one who serves God with love, or ‘a pious hasid who has completed and perfected himself’.
There are many levels of hasidut, however, one higher than the other. The highest level is a hasid who serves God with love without ulterior motives or desire to receive rewards - one who keeps the Torah and the mitzvot ‘for the sake of the Name’, that is, for the sake of redeeming the Shechinah [and filling Her with Light]. Such a complete hasid becomes a holy Merkava that does not want Glory for himself because he know that the Glory is God’s. And this is the holiness that Rabbi Pinchas ben Ya’ir said brings to divine inspiration and prophecy.
From Rabbi Moshe Chayim Luzzatto (the Ramchal):
4. One who is holy is constantly attached to God. His soul strolls through the teachings of the wisdom of truth with love and reverence for God. Such a person is considered to be strolling before God in the realms of Eternal Life while he is still here in ‘this world’. This happens when one’s awareness and mind are always firmly incorporated in the greatness of God, His majesty and His holiness - so much so that it is as if he was actually attached to the supernal angels while still in ‘this world’.
A person cannot do this all by himself. He can only arouse himself to want this and strive to achieve it. After a person has prepared himself with all the necessary preparations - the Good attributes from the level of carefulness to the level of reverence - then a Spirit will be poured upon him from Heaven. God will cause His Name YHWH to dwell upon him, as God does with all His holy ones. Then he will actually be like an angel of God and all of his actions - even the most lowly and material - will be like offerings and worship...
From there, one can ascend to an even higher level - divine inspiration - and will be able to learn in this superhuman way. His attachment to God can reach such a high level that he will be given the ‘key’ to the resurrection of the dead, as was given to Elijah and Elisha. This is an expression of an awesome attachment to the Divine, because God is the Source of Life who gives life to all. That is the goal of this Path, as the sages said: Holiness leads to divine inspiration, which leads to the resurrection of the dead.