IME, geldings can misbehave just to be mischievous. Mares misbehave almost entirely in order to sort out social dominance relations in their world. In other words, dealing with a mare is like dealing with an eleven year old girl, right down to the squealing and running in circles.
I am the main, almost sole person, now who handles my mare. She is constantly trying to tell me what to do, on the ground and in the saddle. We have worked on this with basic ground manners and clicker, and things are a lot better. And when she is happy, she is a delight.
The interesting thing is, every once in a while some total beginner child will get a chance to brush her. And maresy relaxes completely, appears to be perfectly OK with the situation. But when I brush her, she is constantly telling me to get lost, get out of her space, stop bothering her already. The total beginner child has no authority over her, and she knows that. You would think she would “push” more with the child, if she is so upset about brushing. But in fact she doesn’t.
And I think the reason is, she doesn’t feel there is any need to assert herself with the child. She doesn’t have to score points with the child. Whereas, every time we interact, she is trying to tell me she is the boss from the get-go. Stop touching me! Stop looking at me! Get out of my space! You stink!
So I think it makes total sense that your mare is being nastier to you than to other people. Think about eleven year old girls. They can be really really rude to their moms, because they feel a bit squished and over-monitored. But put them with new adults, or older kids, and they can be very mature and rise to the level expected of them (one reason why even riding instructor’s kids might benefit from lessons from someone else for a while).
So you do need to exercise some tough love with the mare. If she has got beyond what you can handle, get a good ground-work trainer in for some sessions. Unfortunately, often even good riding instructors don’t have good ground-work instruction skills.
I have found with my mare that the most effective discipline is making her move away from me, promptly. We can play nip/slap all day, but as long as I don’t make her move her feet, she feels that she still hasn’t “lost” that round. When I watch her play social games over the paddock fences, though, the horse that wins is the horse that stands her ground; the one that loses is the one that moves away.
Put a rope halter on her, and when she gives you attitude, shake that rope until she has to move backwards relatively fast; do it every time she acts pissy. This might mean working in a larger, but enclosed, area, maybe taking her to a round pen or the arena to brush. You don’t want to make her move around like that inside a stall, and obviously you can’t in cross ties. My horse has a stall with run-out paddock, and I brush and tack up loose, so if she gives me attitude I can chase her out into the paddock.
Clicker training has also worked well. To the point where sometimes she nickers in anticipation when I start to tighten the girth.