''I have a headache'' would be "atama ga itaï" (zutsuu ga aru in medical term)
''I'm unhappy'' would be "ureshikunaï, sabishii", but I have not really heard
"atama ga itaï" to express unhappiness ...
Another way to put this is "mukatsuku" lit. I am disgusted (I feel like vomiting), which could be linked to a headache ...