
Why do I sometimes feel shame and regret?
Here's the answer:

Shame and regret happen because you are a sinful human, learning to follow God.
All of us feel shame and regret from time to time. Whether it is things that we have done recently or things in our past, we can feel shame and regret for them. These things in themselves are not bad, as they can lead us to doing the right things in the future. In the Bible, we are shown many people who struggled with shame and regret, and they learned from it.
Adam and Eve were born into Paradise, yet they messed things up when they disobeyed God. Due to their sin, they were exiled from the Garden of Eden (Genesis 3). Adam and Eve probably felt much shame and regret for what they had done. They could have lived forever in Eden with God, but they chose to sin.
Another person we can learn from is the apostle Peter. He dealt with much shame and regret in his life, too. He disowned Jesus three times, despite telling the Lord that he would die for Him (John 13:37–38). After Peter disowned the Lord three times, he went outside and wept bitterly (Luke 22:62). Peter was reinstated by Jesus after His resurrection, but Peter most likely felt shame and regret over his actions for the rest of his life.
Whenever we are feeling shame and regret, we can turn to Jesus. If we confess our sins, He will forgive us (1 John 1:9). As children of God, He will forgive us and place our feet back on steady ground. Bring all of your shame and regret to the Lord and trust them in His hands. He will forgive you and bring joy back into your life.

Bible Truth
"Meanwhile, Simon Peter was still standing there warming himself by the fire. So they asked him, ‘You aren’t one of Jesus’ disciples too, are you?’ He said, ‘I am not.’ One of the high priest’s slaves was a relative of the man whose ear Peter had cut off. He said to Peter, 'Didn't I see you with Jesus in the garden?' Again Peter said no. At that exact moment a rooster began to crow" (John 18:25–27).
"Some people did accept him and did believe in his name. He gave them the right to become children of God" (John 1:12).
"Let us keep looking to Jesus. He is the one who started this journey of faith. And he is the one who completes the journey of faith. He paid no attention to the shame of the cross. He suffered there because of the joy he was looking forward to. Then he sat down at the right hand of the throne of God" (Hebrews 12:2).