Cut off your nose to spite your face

1. To disadvantage yourself in order to do harm to an opponent or adversary.