To pull one’s hair out / to tear one’s hair out
to be very worried or upset about something:
We’ve been tearing our hair out trying to decide what to do.