beat your brains out
From Longman Dictionary of Contemporary Englishbeat your brains outbeat your brains outTHINK ABOUTto think about something very hard and for a long time I’ve been beating my brains out all week trying to finish this essay. → beatExamples from the Corpusbeat your brains out• Why should you beat your brains out fighting the environmentalists?• Shall we beat their brains out in court?• Seven hours of beating your brains out when you weren't feeling all that hot to begin with.