“For I am persuaded that neither death nor life, nor angels nor principalities nor powers, nor things present nor things to come, nor height nor depth, nor any other created thing, shall be able to separate us from the love of God which is in Christ Jesus our Lord.” (Romans 8:38-39)
In other words, there is nothing WE can do that can separate us from the love of God. There is no mistake we can make that is big enough to make Jesus disown us. So, if you are a follower of Jesus Christ, and you did something wrong, move on, don’t dwell on it, and stay close to Him. That is how you avoid making the mistake again.