I’m not a psychologist so I can’t tell you anything definitive, but getting very upset over something unexpected happening could be anxiety related. Everyone naturally gets frustrated when things don’t work out, but a lot of mental illnesses are just ‘normal’ things dialed up to 10.
It could also be a lot of stuff other than anxiety! Mental health is super complicated, regardless of what it is (if anything).
Are you in therapy with someone you trust in addition to meds? Because meds helped me a lot, but the therapy was super necessary for me as well.