This is likely to be migraine. You should consult a neurologist. Please read the symptoms of the migraine in this resource;
There are two types of medications used for the treatment of migraine;
1) To abort the attack
2) To prevent the headache
Valproic acid, gabapentin
Calcium channel blockers
Beta-blockers, tricyclic antidepressants
Botulinum toxin-A is also used in cases for refractory chronic migraine.
There are dietary triggers known which should be avoided. Common triggers are
b) aged cheeses and meats,
c) wine and beer
d) citrus fruits.
Please feel free for your follow up questions.