The Quran says: 'Say, O My servants who have transgressed against themselves, do not despair of the mercy of Allah. Indeed Allah forgives all sins.' It says that Allah accepts repentance from His servants and pardons evil deeds, and that for those who repent, believe and do righteous work, Allah will change their bad deeds into good ones. The Prophet ﷺ said that if you did not sin, Allah would take you away and bring a people who sin, then ask Allah for forgiveness, and He would forgive them. This does not praise sin; it shows how much Allah loves to forgive. He also taught the 'master of seeking forgiveness', a short prayer in which a person admits Allah's favour and their own fault and asks for pardon.
Repentance has conditions that scholars describe: to stop the wrong, to feel regret, to decide not to go back to it, and, if the wrong was against another person, to return what was taken or ask forgiveness, since the Prophet ﷺ said that on the Day of Judgment there will be no dinar or dirham and the wrongdoer's good deeds will be taken for the one he wronged. Islam does not use guilt as a punishment. It uses regret as a starting point, and then asks for action: good deeds wipe out bad deeds, says the Quran.
The Prophet ﷺ told of a man who had killed ninety-nine people and then asked whether he could repent. A monk said no, and he killed him too. A learned man said: 'Who can stand between you and repentance?' and sent him to a land of good people. He died on the way, and the angels of mercy took him. The story is told to show that no one is beyond turning back, not to make light of harm, since a person who has hurt others still owes them what they can repay. If you carry shame, the way out in Islam is not to punish yourself but to turn to Allah, put right what you can, and live differently from today.