In case of pain , your doctor will give you painkiller. you can take but it is always advisable to take when your doctor prescribe. you should also check if you are allergic to any drug. temporary, you may get relief with the help of pain killer. but dental consultation is necessary. dental treatment is the final solution for the pain and infection..