If you give treats, never ever give them to this horse by hand. I have a youngin that likes to nibble on me. If I don't give her treats or have them in my pockets she stops. I personally take it as a sign of disrespect when a horse bites. The best thing you can do in that instant is make them move. Don't attempt to smack them, rather do as another horse would do in the same situation and that is to make them move away from you.
If you have the time, set up a situation where you know he is going to bite and be prepared. Have a whip or just your hands. raise your hands above your head and walk at him shouting and making a back away gesture with your hands. Do it several times. Then always be aware that he may bite and do the "I'm bigger than you get away" act. It won't be long before he figures out your the lead mare and won't take being nipped.
"Until one has loved an animal, part of one's soul remains unawakened..."
- Anatole France