Thanks for asking the query,
Pain which you are getting can be due to errupting wisdom tooth, wisdom tooth is the last tooth to errupt in the oral cavity and is often tilted, malaligned and impacted.
Pain in the temple and right side of face is of dental origin (reffered pain).
I would suggest you to visit a Oral Surgeon and get the check up done.
Take an OPG radiograph is the pain is due wisdom tooth then you have to go for its extraction.
You can take tab Aceclofenac
along with tab Amoxiclav
twice for 3-5 days.
Use antiseptic mouthwash gargles twice to prevent superinfection
Maintain a good oral hygiene
Hope this helps out.