Don't be too hard on yourself, and remember these things...
It wasn't on purpose.
You know the mistake you made wasn't on purpose. You probably misunderstood the circumstances or were a victim of miscommunication. A mistake doesn't make you a bad person.
If someone else had done this, I would forgive them.
You're your own harshest critic! Imagine what your reaction would be if your friend made that mistake, would you be ready to forgive them?
I've done everything I reasonably can to fix things.
If you're reading this, you've most likely already done all you can to fix what went wrong. And if so, then that's all you can really do: your best. Once you've done all you can, you can declare the mistake officially over and start getting over it.
If this is the worst mistake I ever make, I'll be in pretty good shape.
You're probably feeling a bit down in the dumps, but this won't be the worst mistake you make. You're human, you should know that mistakes eventually go away, we move on and build happier lives, and everything is going to be okay.
I'll be smarter next time.
You win some, you lose some, but there's always going to be a next time. Now you can see that mistake coming and properly do something to avoid it. Take a deep breath, it's over, and remember that no matter how bad the mistake was, it'll help you do things better for tomorrow so maybe it wasn't so terrible after all.