Hello there, as per your complaint, I think you have got a dental abscess. A dental abscess is infection of root apex of any decayed or non-decayed teeth. Swelling of affected area and pain on percussion of infected tooth are primary symptom of a dental abscess.
Next Steps
I would like to suggest you to visit any dental surgeon, course of treatment could be drainage of accumulated pus followed by Root Canal treatment of affected tooth if required. Follow the instructions and medication suggested by your dentist.
Health Tips
avoid mastication of any hard food from affected side, until you visit your dentist.