which I admitted I overreacted to and I ended up in hospital after this
The meeting ended badly because we were disputing whether or not I had raised the issue early enough.
What do these mean? On the face of it, it sounds like you had some very extreme / intense reactions and interactions at work that may not have been entirely appropriate? Reading between the lines it sounds like you got into shouting matches or at least became highly emotional and possibly accusatory?
If your boss's attitude changed (genuinely changed, not just you were worried it had and then interpreted everything in a way to "prove" that belief), perhaps it was more about incidents like these than the miscommunication about workload?
The next day, I was really heavily told off for being behind
What did this look like? Given that you've acknowledged a tendency to overreact to what was going on and described perceptions that don't align with the facts, is it not also possible that because of how you were feeling at the time you misinterpreted what was said as a "telling off"?
Similarly if you were getting angry / upset in all these conversations and becoming defensive / hostile, it would have been quite difficult for them to be constructive with you or for you to be receptive to that. They might only have been trying to understand what had happened but you interpreted it as a telling off.
because I felt really useless and that I was just making excuses for my own perofrmance, and maybe I'm not really able to cope with a job
For instance these thoughts are your opinions not facts and they are clearly driving a strong emotional response that is distorting your vision, however on a balanced view I am not sure I would agree that they are factual beliefs to hold.
Thinking that way has clearly influenced your behaviour and how you feel. It sounds like you're interpreting everything that happens through this distorted lens.
"I think I am useless and just making excuses, therefore this conversation about my workload must be an attack on me."
You're not going to feel confident or positive while you're holding beliefs like this, no matter what anybody else does.
feeling I was about to be fired constantly because of this one
Again, this was an opinion - what was the basis for it? Had you been given a written warning? Been started on capability procedures? Been invited to a disciplinary meeting?
Or was it another case of "I think I am useless and I think my boss has it in for me, therefore when they were a bit grumpy today it must be because of me and mean they're going to fire me"?
" I think I am useless so of course they will fire me"?
it felt like they wanted to give me a warning for being fired etc but they never actually got round to saying it
Again, a thought based on? Your beliefs? Mind reading?
Afterwards on e-mail I tried to (constructively) point out the issue... However, this was not well received
What did that look like? Without seeing the email or witnessing their response it's hard to know whether this was another miscommunication. Perhaps if you were feeling attacked and weren't expressing yourself well the email wasn't written in a way that sounded constructive (even if you intended it to be). Perhaps you misunderstood their response.
By your own admission you made mistakes in how you handled things. It sounds like they did too. But you have also been walking around with some very strong core beliefs that are not helping you to feel better or to be able to engage with people in better ways.
Have you had any support to address those core beliefs and the unhelpful thoughts that are the cause of your low feelings and loss of confidence?
Because that is something within your power to change, whereas you can't go back and change anything that's happened in the past.