Sweetheart - none of us are perfect mums, or perfect parents, we are all just doing our best.
My DS is older now, but I remember the early days, and I've had some awful moments myself, admittedly we were in an extremely awful situation in the early days.
The best thing you can do is to manage your anger by finding a way to make sure she is safe and leave the room for a few minutes, for her to calm down and for you.
The hitting doors isn't good, and you know this. you have given yourself (and dd) a scare, you need to learn from this and move on.
It's a kids job to push boundaries, they push and push no matter where you put them, that's their job. The boundaries and discipline show them they are cared for and loved.
Losing our temper is not good for anyone, but I know my son sometimes has pushed me and pushed me - literally all day - until I did snap.
turns out he was feeling in need of reassurance somehow and wanted to cry and have a cuddle... so we spoke about this (and whenever he was on a mission) and I said to him to cut out the nightmare bit and if he wanted a cuddle and a bit of reassurance we could do that without the crappy behaviour
Your DC is little, so reasoning with her isn't easy at the moment, so a bit of breathing, counting and management is needed, it won't be forever, it does get easier.
My huge preteen got down from his bed last night because he wanted hugs and kisses... we are the closest 2 people can be, me and him, we've been through a LOT.
You absolutely can do this. Trust me, if I can, so can you.
please keep posting, you need the solidarity and support of others. anonymous others are really good in this kind of situation, we say things we won't say to friends who know us