Can You Treat a Toothache While Fasting?
Question

I have an urgent question regarding the upcoming Ramadan. My wisdom teeth have just started coming out, and it is extremely painful. I was wondering if I can:
a) apply a soothing gel on my gums during the fasting period,
b) get them surgically removed and still keep on fasting if I'm on painkillers.
Praise be to Allah.Yes, it is permissible to treat one’s teeth and apply paste and the like to the gums whilst fasting, but that is subject to the condition that you do not swallow it. 
In the book, Seventy Issues related to Fasting, it says: 
There are some things that do not invalidate the fast, some of which we will mention by way of example: 

Tablets that are placed under the tongue to treat angina and other conditions - so long as one avoids swallowing anything that reaches the throat.
Dental fillings , tooth extractions, cleaning of the teeth, use of siwak or toothbrush - so long as one avoids swallowing anything that reaches the throat.
Rinsing , gargling or applying topical mouth sprays - so long as one avoids swallowing anything that reaches the throat.

Similarly ,there is nothing wrong with having an operation during the day in Ramadan under anaesthetic , so long as the anaesthetic will not last all day, i.e., from dawn until sunset, because the ruling on anaesthesia in this case is the same as the ruling on sleep.