(I think we all have problems with this. However, if God through His son Jesus Christ, can will forgive us, we can forgive ourselves. I am so thankful for the gift of forgiveness, even though sometimes it is hard to receive from others.)
If we confess our sins, He is faithful and just and will forgive us our sins and purify us from all unrighteousness. - 1 John 1:9
The apostle Peter was one of three disciples who walked with Jesus closer than the other nine. He was the most enthusiastic and the one man who was willing to step into territories where others would not dare. He was the first to step out of the boat and walk on water. He wanted to protect Jesus at times when Jesus rebuked him for having a demon influence him. He cut off the ear of the guard who wanted to arrest Jesus in the garden. As Peter matured, the Holy Spirit harnessed his many extreme emotions.
The greatest trial for Peter was when he denied the Lord just before Jesus was crucified. Three times he denied knowing Jesus. Jesus predicted that the cock would crow after the third time just to reinforce the prophecy to Peter. Peter was crushed when he realized he had failed His Lord so badly.
The Lord forgave Peter for his denial. However, gaining forgiveness from Jesus was not the most difficult part for Peter. The hard part was forgiving himself. As we mature in the faith, we begin moving in victory after victory with our Lord. Then out of nowhere, an event happens that reveals our true sin nature, and we are confronted face to face with this reality. We cannot believe that we are capable of such sin. There is no good thing in us save the grace of Jesus Christ and His blood that cleanses us. When God looks at us, He looks at the blood of Christ that has covered our sin. He does not look at our sin once we confess it.
When we have difficulty forgiving ourselves, this is pride at its deepest level. We are making an assumption that we should never have sinned and that we are too mature to sin. This is a trap from the enemy of our souls. People who cannot forgive do not recognize from what they have been forgiven. That includes us.