One way to the purification of the heart is by seeking knowledge whether by reading books or listening to lectures that connect you more to the teachings of the Quran.
When Allah chose to guide His creation and bring them out of darkness into the light, He revealed a Book upon them to be read and recited. The first verse of the Final Revelation shows us that this was the key to rectification of the hearts and the affairs of the people in all times and places:
إقْرَأ بِسْمِ رَبِّكَ الذي خَلَق
“Recite in the Name of your Lord”.
Whoever desires victory and wishes to purify his soul and improve himself, he has no better option than the Quran and Sunnah: He must read, memorise and teach it. And not just skim through the books but actually read, pause, reflect and implement.