you are not a bad Mum. I've had many moments like this. (I have depression, pain, and DS still doesn't sleep through the night and he's nearly 3, so I'm VERY tired) Being a parent is the most frustrating, exhausting thing in the world and some days DS is just too hard to handle. I
f he is safer screaming in his bed for 30mins than he is with me, so be it.
IMO, the important thing is to apologise after and remind him I love him. I explain to him I'm very tired and it makes me grumpy but it doesn't make it ok for me to yell at him so I'm sorry. He probably doesn't understand all of it but he will get bits and as he gets older he will understand more and I can elaborate.