Without knowing more it sounds like a 'cluster headache'. Google it and see if the symptoms match. Best treatment to instantly kill the pain is immigrin sub cutaneous (called Immitrex in the US) - not available in Thailand. Medical oxygen with a medical mask can abort an attack. Cannabis will work (but not when you have a headache) with regular use to reduce the usual 'triggers' - any indica based cannabis.