Hi V.,
My son did the same thing with me and rarely he still does. What I found to be most useful, especially when babies are teething, is to closely monitor how she is on the breast. The only way a baby can bite your nipple is if her teeth can get close enough together to bite into the skin. So, if you have the baby latched on where your nipple is quite as far back into her mouth as the nipple can go, with almost all of your aereola (the darker circle around your nipple) in her mouth, then its not possible, or at least very difficult, for her to bite you.
I found the same thing happened - if I got upset, showed my pain a loud sound and firmly said NO, then my boy wouldn't understand what was happening, or he'd laugh.
The first time it actually happened, where he bit me, I cried. I had been anxious about it happening (him actually biting me), and I knew it would eventually happen. So, I cried and kept him close to me and he cried, too. It actually wasn't horrible - the bite itself or our crying together. I gently explained to him what was happening AND we got a good latch on the breast, so it didn't happen again for quite some time.
Hope this is helpful. I encourage you to stick with it, even though it might feel super difficult. You'll firure it out! Good luck!
-L.
student midwife
mother of Romero (16 months and still breastfeeding)