Teeth suffering from infection with consequent pain may also exhibit swelling, redness, and bad taste in the mouth. This is induced due to the bacteria that invade the cavities or can slip through a fractured tooth. To control the pain, rinse your mouth with warm salt water and take over-the-counter pain relievers before you help your doctor. Properly, you should see a dentist to treat the infection. It would be best if you brush and floss regularly to prevent future infections.