It seems from the history that you had a injury to the head following which you are having headache.
Since you also give history of loss of consciousness
for few seconds, the chances of concussion head injury
has to be ruled out.
Hence I advice you to consult your doctor for evaluation by tests like CT scan
to rule out concussion head injury and treatment accordingly.