Imam has undertaken very useful discussion in his famous book “an exposition on Forty Hadith” and says in this regard as following
What I am going to mention here to you is expected to work effectively for curing this disease of the heart, your as well as others’. It shall be also according to the rational dictates as well as is in conformity with the truths of revelation and tradition of the Ma’sumin (the infallibles). It is as well verifiable on the basis of the teachings of the Quran and your and my reason. God Almighty, by means of His all embracing power and might, which governs the whole universe and is immanent in the realms of all possible beings, takes under His control the hearts of all His servants, as no one is outside the range of His power and the domain of His domination; and no one should occupy the hearts of human beings without His permission and His creative Will; not even the person himself has any control over his own heart without the permission of God Almighty. This fact has been revealed implicitly and explicitly in the Quran as well as the traditions of the members of the Household (Ahl al-Bayt)of the Prophet (PBUH).
Hence, God Almighty is the real owner of the hearts and has sovereignty over them, and you, a helpless and weak creature of Him, you cannot claim to be the master of your heart, without His leave. His Will is predominant over ours and other creatures’ resolution. Therefore, your hypocrisy and deceit, if it is meant for attracting the attention of His servants and for earning respect and popularity among them, know that it cannot bear any fruits, for this is totally beyond your powers, and it belongs to the jurisdiction of His power.
He is the owner and the ruler of the hearts. He makes the hearts of the people a seat of love for whomsoever He likes. It is possible that your act produces a result just contrary to your wish. Pay attention to what we have seen and heard about the double-faced hypocrites, whose hearts were not pure; they were ultimately condemned to be disgraced; whatever they intended, they could not achieve, but something that they did not desire happened to them.