hitting one's head against the wall; repeatedly doing something that is frustrating and has no positive result
BANGING ONE'S HEAD AGAINST THE WALL
Meaning of BANGING ONE'S HEAD AGAINST THE WALL in English
Explanatory English dictionary bed edition. Толковый словарь английского языка Редакция bed. 2012