To harm oneself as a result of attempting to harm an adversary.
saw off the branch one is sitting on
verb
To pursue a course of action that will lead to self-destruction.
How often have the words cut off one's nose to spite one's face and saw off the branch one is sitting on occurred in a corpus of books? (source: Google Ngram Viewer )