When we ask for forgiveness in general, it is usually because we wrong someone. After I had decided to walk away from God and live in sin for a while before hitting rock bottom and coming back, I remember I had wept in my pastor's arms who told me as if God Himself was speaking to me, "Rebecca, you need to forgive yourself. God has. He see's you as whole, pure, and white as snow. It breaks His heart to see you still hurting and feeling ashamed. Let it go and forgive yourself."
In a way, I had wronged myself. I had robbed myself of what God had for me and instead went on a different path. It makes so much sense that (even if it wasn't in scripture) God would ask of us to also forgive ourselves and not hold things against ourselves. It prevents us from receiving His gifts. I remember it took me a while to receive anything good from Him. I would just remember what I had done and say "I don't deserve that. Not after what I had done." God was so gentle and patient as He would often remind me that my slate was wiped clean.
Hilariously, a lot of us actually struggle with this. It is so much harder to forgive oneself than another. And God knows this which is why He is always there to help us and remind us when we decide to pick up the shovel and unearth our past sins for the billionth time, that we need to step back, drop the shovel and take His hand instead.