The memory of transgression will always give pain. Penitence is not the best thing; innocence is far better. But, having sinned, penitence is infinitely better than despair. And even out of the sin, the shame, and the sorrow God can bring blessing for ourselves and for others. While we cannot undo our wrong deeds, God can keep them from undoing us, and can even bring good out of them in some strange way, if we commit the whole matter to him.