The crying is a GOOD thing. You WANT her to associate feeling badly with hurting someone. Empathy is a LEARNED trait. It's the absolute foundation between either spanking or timeouts. You cause her pain (physical or emotional) in response to her causing you or others pain. The brain then associates doing something "wrong" with feeling badly about it.
Show her what gentle is when she NOT hitting upset. Patting at different strengths. Gentle, too hard, no. Gentle, too hard, no. Smile with gentle, frown and look upset with too hard.
And then when she DOES hit you when she's upset, you go with your preferred method for teaching right and wrong. Either set her down (in her crib would be my first choice) with an unhappy look on your face saying "No. Too hard. No hitting. You HURT mommy." and WALK AWAY (ideally go about your daily business where she can see you and can't get to you) for a few minutes. You really, really, really WANT those tears... OR cause her physical pain (slapping her hand).
Those aren't the only choices you have... but those are the two that will teach her empathy for others.
BEFORE you console her, make sure she's doing the baby version of "sorry".
But each and every single time... swift and immediate justice.