Guilt and shame seem to serve the practical purpose of helping you learn from your mistakes. However, this idea is based on the faulty thinking that you could have done other than you did. If it were possible for things to have happened differently, they would have. Mistakes are valuable tools to help you learn, not reasons to punish yourself.

Learn the lesson and move on.