Attachment to Hashem, may He be blessed, is a mitzvah counted among the 613 commandments. It entails cleaving to Hashem constantly with great rapture and a flaming love for Him. There really is no greater trait than it, but precisely its importance is what makes it so hard to attain. So, how much a person achieves of it depends on a his actions and efforts to attain it in mind, speech and deed — to strive every day to reach ever greater heights. Whoever sanctifies himself down below [in his Earthly efforts], is [assisted by Heaven] and sanctified from above with a spirit from on High that purifies and sanctifies him. Each person, therefore, must do whatever is in his power to fulfill this mitzvah, whenever he can bring it to mind. How good it is to write a reminder and place it where he can see it all times. One who takes the first steps to purify himself receives Divine assistance.
Our Sages comment on the verse Cling to Him (Devarim 11:22): “Is it possible to cling to the Divine Presence? Does it not say, Hashem, your God is like a consuming fire (ibid. 4:24)? Rather, [the commandment is to] cling to His Attributes; just as He is compassionate, you be compassionate, just as He grants grace, you grant grace” (Shabbos 133b). People assume that they already cling to His attributes, for all Jews are merciful, children of merciful Forefathers — which person does not care about the poor? But in order to truly emulate God one needs to have mercy and compassion even towards an enemy that seeks to harm him. Even towards a person of terrible nature who is acting brazenly one should not withhold kindness and compassion, and even if he will use that favor that he receives against his benefactor — just as the Holy One acts towards His creatures.