Cut off your nose to spite your face
Disadvantage yourself in order to do harm to an adversary.
The precise wording 'cut off your nose to spite your face' doesn't appear in print until the 18th century. Versions of proverbs that mean much the same thing date back to the Tudor era. John Heywood's A Dialogue Conteynyng Prouerbes and Epigrammes, 1562 list this entry under "Of Spite":
If there be any, as I hope there be none,
That would lese [lose] both his eyes to lese his foe one,
Then fear I there be many, as the world go'th,
That would lese one eye to lese their foes both.
Grose's 1796 edition of the Classical Dictionary of the Vulgar Tongue came a little closer to the current form:
"He cut off his nose to be revenged of his face. Said of one who, to be revenged on his neighbour, has materially injured himself."