People lose jobs all the time.
People make mistakes all the time.
Jobs don't determine who you are, so getting fired from one doesn't make you bad.
Sounds like you know what went wrong, feel embarrassed and grieve over it for a couple of days, and then forgive yourself and figure out a strategy for preventing it from happening again.
If you need to work, start looking for a new job quickly so you don't psych yourself out-- get back on the horse that threw you.
For the record, your previous employer cannot tattle on you to your next employer and provide details of what you did wrong (here in the U.S.), so figure out how you'll frame it in future interviews "I left because of some scheduling issues but they are resolved now."
But the thing I say to myself the most often when I screw up and it costs me is just "Fail forward."-- what can I learn from this and what can I do better next time.
FORGIVE YOURSELF, IT WILL BE OKAY.