Thank you for your question and welcome to Just Answer.
A very good way to control dental pain using over the counter medications is to switch between taking 400 milligrams of ibuprofen (e.g., 2 tablets of Advil), and 1000 milligrams of acetaminophen (e.g., 2 tablets of extra-strength Tylenol) every 3 hours. Be careful not to use these medications if you have had previous adverse reactions to either, or if you have had gastritis or peptic ulcer disease in the past, or if you have liver disease. Anything stronger and you will need a prescription which will necessitate you talking to your dentist, physician or a visit to the ER.
In addition, you can try "Toothache Drops" available at your pharmacy. This is clove oil (eugenol) which is very soothing to an exposed tooth. Place a drop or two on a cotton pellet and place on the tooth or on the hole of the tooth.
As far as the infection is concerned, you can not completely get rid of the infection without having the tooth treated by a dentist as the source of the infection is the dead nerve inside the tooth which needs to be removed.
You can reduce the infection by taking antibiotics, but a prescription is needed to get some.
You can try rinsing your mouth with very warm salt water for two minutes several times a day. The heat from the water will sometimes cause the infection to point, not unlike a pimple, and burst, releasing the pressure from the abscess.
I hope this answers your question. If you would like to discuss this further or have any additional questions, please reply to my answer and I will get right back to you.
Sincerely, XXXXX XXXXX DDS