From Longman Dictionary of Contemporary Englishbe tearing/pulling your hair outbe tearing/pulling your hair outto be very worried or angry about something, especially because you do not know what to do Anyone else would have been tearing their hair out trying to follow these instructions. → hair
Examples from the Corpus
be tearing/pulling your hair out• Anyone else would be tearing his hair out, confronted by a pack of jabbering foreigners, but does Feargal?• I was pulling my hair out.