I think antiphlogistic is the medicine for toothache for the dog.
You need a vet. You can't give them any meds and dental issues usually need a vet like we would need a dentist. Your pup may also need antibiotics for infection that can spread to blood stream, kidneys, heart ect. Hope your baby is feeling better soon.