Toothache can cause headache as well as foul smell.
I would suggest you to visit a dentist
and get clinical examination done.
Get scaling done.
Decayed teeth has to be restored or root canal
Take complete course of medicines prescribed.
Maintain oral care.
Avoid intake of too cold/too hot food stuffs.
Hope this helps.