Wiktionary
cut off one's nose to spite one's face
vb. (context idiomatic English) To harm oneself as a result of attempting to harm an adversary.