I'm so glad you came to this understanding. It is absolutely necessary to forgive yourself for the mistakes you make....but it is one of the most difficult things I believe I've ever had to learn to do.
It sounds so simple to forgive yourself, but it's not....but you can do this. Don't be at all surprised when this happens if you have a flood of emotions come over you...just go with them and work through them. You won't believe the weight that will be lifted.