The main factors for having a kind and pure heart are: Feeding the poor, caring for orphans, crying for the sake of fearing God, repenting, consistency in worship of God, remembering death and the day of Judgment, reciting the holy Quran and reciting Zikr a lot for the praise of Allah (SWT) in private. It is narrated that Fazil ibn Ayaz used to be a dangerous thief and one day when he was passing by a place saw a girl and liked her. At night climbed the wall of her house and at that time heard the recitation of the holy Quran (Ayah 16 of Surah Al-Hadeed): “Has not the time come for the believers that their hearts in all humility should remember Allah (SWT)…”
This holy verse affected him strongly and he decided to repent there and then and said: O’ God, I repented, cure my illness and forgive me. God accepted his prayers, he went to Mecca and prayed to God in there for years and died in there on the Day of Ashura . Performing Divine Duties, obedience and servitude of God result in purification of the soul and relief of the heart .
 Mizanul Hekmah, Vol. 2, Pages 853 and 855 and Naseem Hayat, Vol. 8, Page 38.
 Tasneem, Vol. 5, page 222.