It seems from the history that you are having frequent episodes of recurrent headache probably migraine in nature.Migraine headache
is one of the common types of primary headaches
and it is completely curable by appropriate treatment.
The treatment in acute episode is by use of antiinflammatory drugs and recurrent episodes are prevented by use of prophylactic drugs like fluarizine.
Hence I advice you to consult your doctor for examination and treatment accordingly.