In this regard Bhagwat Puran & Bhagwat Gita, both explain about these assurances in detail that Devotion to God is the supreme purifier for all the sins that a person commits in life time. Below are few verses from Bhagwat Puran regarding this:
"In this world devotion & surrender to God is the path that is really appropriate & the one that is to be followed by the well-behaved, fearless and auspicious, saintly people."
"Like all the rivers of the world cannot purify a liquor jar by washing it, similarly Most of the atonement well performed by a nondevotee will not purify. We need to be a devotee of God."
"Once the mind is full of surrender to the two lotus feet of Lord Krishna & the mind hankers after His qualities only then that person shall never encounter Yamarâja (Death God) and his superintendents, or even in one's dreams meet his servants carrying the ropes to bind. Devotion to Lord Krishna is the right atonement."
"Like the Sun does away with all the fog, similarly Devotion to God does away with all the sins. A man full of sin, is for certain not as much purified by penance as by the devotion to Lord Krishna."
In Bhagwat Gita also God himself is giving that assurance:
'Api chet su-duracharo
bhajate maam ananya-bhak
sadhurev sa mantavya
samyag vyvasito hi sah' (Bhagwat Gita: Chapter IX verse 30)
'Even if the vilest sinner worships Me with full devotion, he should be considered a noble soul or saint; as he has taken the right step by worshipping me.'
Through above verse, God is telling Arjuna that even if the most sinful of person worships Him with full devotion, then He considers him to be a saint only as he has rightly resolved in his life. So many times we too think that we have done many sins in our life & how God shall accept us, but here God makes it very clear that once a person becomes devoted to Him, He does not consider that person to be a sinner, rather God considers that person to be a Saint as he has taken the right decision in his life to become devoted to God. Let's all be devotees of God.
mam ekam saranam vraja
aham tvam sarva-papebhyo
mokshayisyami ma suchah" (Bhagwat Gita: Chapter Eighteen verse 66)
"Sri Krishna said: O Arjuna, Abandon all varieties of religion and just surrender unto Me. I shall purify you from all the sins. Do not fear."
'man-mna bhav mad-bhakto
madhyaji maam namaskuru
atmanam mat-parayanah' (Bhagwat Gita: Chapter Nine verse 34)
'Fix your mind on Me, be devoted to me, worship Me & offer obeisance's to Me. In this way, linking to Me, you shall surely come to Me.'
Through above verse, God is asking Arjuna to fix his mind on God as after worshipping Him & paying obeisance's to God, he shall automatically come to Him. We should also follow the same path & let's become devoted to God by praying Him daily. God is very clear that once a person comes in God's refuge, then all his problems & sins are resolved & God becomes his/her protector in this life & life beyond.
So from the above said verses it is very clear that to get rid of all the sins is to take refuge in God through "Devotion". In Bhagwat Gita, God assures his disciple Arjuna in many ways & asks him to take refuge in Him & says that He shall emancipate him of the sin in all ways, shall rescue him in his life always. Many times we think that we have done many sins in life & how God shall accept us, but God makes it very clear in Bhagwat Gita that once a person become devoted to Him, He does not consider that person a sinner, rather God considers that person to be a Saint as he has taken the right decision in his life to become devoted to God.So let's all be devotees of God.
Jai Sri Krishna.