I think Rose Marie meant "J'ai un mal de tête". I don't know if that would be considered less formal. This thread on WordReference suggests it's more complicated than that.
https://forum.wordreference.com/threads/jai-un-mal-de-t%C3%AAte-jai-mal-%C3%A0-la-t%C3%AAte.732133/
One user says:
On dit "j'ai mal à la tête" ou "j'ai un (violent) mal de tête"
Dans la deuxième expression, il y a toujours un adjectif pour qualifier le mal de tête.
Another user says that there is often an adjective, but not always.