By the time you realize your mistakes, you are too late. You are not a machine. You may and you will make mistakes. It doesn’t matter if you make a mistake. What matters is, if the mistake is in your action alone or if the mistake is in your intention too. If the mistake is not in your intention, wait for your time and you’ll sure be forgiven.
Every time such a thing happens, you will learn a valuable lesson. Every such lesson may give you a lot of pain. At such times, remember: “Pain is inevitable. But suffering is optional”