Depends on the source of the pain. I have bad back teeth. I should see a dentist but I’m poor and uninsured so it’s not likely to happen.
I’ve found treatment for pain depends on whether it’s an exposed nerve or infection.
For infection: Ibuprofen (if it’s just for a few days you can take more. I was prescribed 800 mg for stitches once so I know four is safe for short term use, and works far better than two.
Soaking my mouth in hydrogen peroxide. It’s foul but it helps with swelling and pain. If you can get ahold of antibiotics that’s great but I have treated many infections with hydrogen peroxide alone. Prepare for the sensation of skunk in your mouth. Have some mouthwash to rinse with. It’s worth it.
For exposed nerve, Den-tek sells an “emergency dental kit” with temporary filling material. If you can’t get to it, one of those Anbesol type products. If you can’t get that (and I’ve recently been in this position) take a swig of your favorite booze and hold it in your mouth where it hurts until the skin in your mouth starts stinging. Your choice whether you swallow or not. It takes away the pain for me almost immediately and works for several hours. No amount of Ibuprofen helped me with the exposed nerve pain. Maybe took the edge off of that jaw-grinding feeling, but not much.
I recently read a recommendation for chewing cashews. The nut is soft enough to seal the exposed break and stays in for a while and the oil is supposedly good for something. I haven’t tried that yet but if it helps, it’s worth it.
It’s pathetic that I know so much about this.