If your daughter sees her grandmother do this and is often with her I suggest you enlist the help of your mother. Perhaps you and your mother can create an alternative way to express her frustration that doesn't involve hurting herself and both you and your mother could then model that method for your daughter. Toddlers learn by copying what they see.
Diversion is a great way to handle frustrated and/or angry moods. If I can't use words to express my feelings, I go for a walk. I leave the situation which is causing me these feelings. A toddler does need help to do that. You are helping her learn a new way when you divert her attention.
At 17 months, I'm not sure your daughter understands your explanations. Perhaps now that you've explained in several words you could devise a 2-3 words that she could learn to use as a trigger to do something else. You and she could plan ahead what the something else would be.
My grandson jumps up and down when he gets frustrated and then angry. I've tried to teach both kids to hit a pillow or the couch but they don't want to do that. I often divert them, especially when they're upset with me, by play boxing. I hold my hands loosely and don't go close enough to even hit them by accident. I say, oh, I'm so angry! Then they follow my lead and in a minute or less we're both laughing.
I have no experience with a child biting themselves so this is just an uneducated idea. Would it help to hold her hand after she's bitten it and be sympathetic to the hand. Say something like, "you poor hand. That bite must've really hurt. What can we tell (your daughter's name) that would help her not bite you. Strong emotions build up energy in the body. If we can do something to reduce that energy the feelings will get less intense too. Perhaps she could run around the room or back and forth in a designated spot. Some kind of activity to reduce the physical energy.
Ordinarily I'd say that she'll outgrow this but I don't know if she will if she sees her grandmother doing it.
Info only. This probably doesn't apply to your mother. Sometimes hurting ones self is caused by not being able to express their feelings in a more productive way. Is your mother able to say what she's feeling when she's biting? Is she aware of her feelings? Sometimes physical pain helps the person release the energy in a way that allows them to feel what they couldn't feel before. i.e. physical pain gets subsituted for emotional pain.