The first step in the undoing is to recognize that you actively decided wrongly, but can as actively decide otherwise. Be very firm with yourself in this, and keep yourself fully aware that the undoing process, which does not come from you, is nevertheless within you because God placed it there. Your part is merely to return to your thinking to the point at which the error was made, and give it over to the Atonement in peace.
Say this to yourself as sincerely as you can, remembering that the Holy Spirit will respond fully to your slightest invitation:
I must have decided wrongly, because I am not at peace.
I made the decision myself, but I can also decide otherwise.
I want to decide otherwise, because I want to be at peace.
I do not feel guilty, because the Holy Spirit will undo all consequences of my wrong decision if I will let Him.
I choose to let Him, by allowing Him to decide for God for me.
Source: A Return to Love by Marianne Williamson (pp. 72-73)