is my head was hurting and I started to bang my head on a wall a clause

Yes, it is a clause. It describes an action (banging your head on a wall) that occurred because your head was hurting.