“She cried afterwards and I held her.”
You’ve already demonstrated to her that in spite of what happened, you love her.
Did it have the desired effect, of stopping what she was doing and considering whether her own behaviour towards you was acceptable?
Probably.
The idea that any parent who ever loses their temper and lashes out is a bad parent is ludicrous. Obviously it’s not ideal, but none of us is perfect. You smacked her once, which stopped the unbearable behaviour in the moment, and while you presumably lost control a little, you only did enough to stop her, you didn’t beat her to a pulp or do any permanent damage.
I’ve seen dogs nip their puppies when the puppies behaviour became too riotous. I’m pretty sure mothers all through nature use limited very small, limited amounts of pain and shock to stop bad behaviour in its tracks. The current obsession with punishing ourselves for such behaviour is unrealistic.
She won’t hate you. She likely won’t remember, though next time she’s being truly horrible, perhaps she’ll think twice because that behaviour resulted in something unpleasant happening last time,
Children whose parents enjoyed hitting them, or did it too often or too hard, and in particular, without reason, or did it to the point where there was permanent mental or physical damage are those who will grow up resenting their parents. The reason all physical punishment is currently frowned upon is because drawing that line in the sand is very difficult, but in my opinion, you are a long way from crossing it and you sound like a good mum.