cut (one's) nose off to spite (one's) face
To use self-destructive means in an attempt to solve a problem or fix a situation. I know you're mad at your dad, but don't cut your nose off to spite your face—running away is only going to make your life harder.
cut one's nose off to spite one's face
Prov. to hurt yourself in an attempt to hurt someone else. (Often in the form, "Don't cut off your nose to spite your face.") Isaac dropped out of school because he wanted to make his father angry; years later, he realized that he had cut off his nose to spite his face.