cut off one's nose to spite one's face
idiomDefinition of cut off one's nose to spite one's face
: to do something that is meant to harm someone else but that also harms the person who does it
You can refuse to talk to her if you like, but you're just cutting off your nose to spite your face.