Three is a tricky age; I found it the hardest age with both of mine, far harder than teens or preteens.
They are getting old enough to want independence but really haven/t got the sense or maturity to handle it, their emotions are enormous but their self control is still limited. Many respond by unbearable whingeing, but some do take to hitting.
What you need to do here is to be her calm unshakeable rock. Try not to raise your voice, deepen it instead, sounds more impressive.
You don't need to stand around letting yourself get hit; it is perfectly ok to catch her hands and hold them- as long as you can do so calmly. Or to lead her to her room. Just stay very calm (outwardly) and repeat in a deep voice: No, we do not hit.
My dd was a hitter (and a biter, and a kicker). But she never got more than one hit in on any one occasion. And she has grown up into a very pleasant person with absolutely no violent or antisocial tendencies.
Ignore anything she says: while she may sound very deliberately hurtful she absolutely does not have the maturity to understand how her words come across. From that pov. she might as well be saying Waaah, waaah, silly mummy! My dd at a slightly younger age once told me gleefully that when she was grown up she wouldn't have to have me for a mummy because I'd be dead by then! She had absolutely no idea of what my death or anybody's death would mean in terms of emotional impact. She had the words but not the maturity of imagination.
The correct answer to any variation of "I hate you, mummy" is "never mind, darling, I love you". Repeated in a calm and confident voice what this tells her is that there is somebody there who is strong enough to deal with all the emotions that are bubbling up and frightening her. And that is what she needs now. It will also help you: the more we act confident the more we feel confident.
But don't assume there is anything wrong with her, or that this is too early: ime (large extended family) this is prime time for exactly that kind of behaviour. If she is about to start school, that may add to her confused emotions.
You may be able to help her by thinking about how you tell her off; is there any way you could avoid triggers/hurting her feelings, while still maintaining the same level of discipline? It's an age where they start becoming very aware of their dignity. But some tantrums will probably be unavoidable; just stay calm and remember it's a phase and that mummy is strong enough for the two of you.