Replaying it over and over in your mind is punishment. It feeds shame and breeds insecurity. Jesus comes back for Peter in John 21 because the only way to overcome regret is to live armed with the knowledge of where your weakness resides and the invitation to allow the Holy Spirit to occupy that place instead.
Know better. Live better.