Thanks for the query
Welcome to HCM
Your headache require neurological evaluation including scan of the brain. If you had cardiac problem, you need to consult a local neurologist
and rule out serious problem by getting a scan done.
Treatment will depend upon the cause.
Until than you may try simple analgesics