Trying to knock yourself out can be defined as repeatedly hitting oneself, generally on the back of head
“Are you trying to knock yourself out?!?”, yelled Timmy's mother.