Kindly get an X-ray done of the tooth having pain. May be you will have to get root canal treatment done followed by a cap /crown. Brush your teeth twice daily using correct brushing technique to maintain your oral hygiene.
Most probably the filling is broken and lodged in gum due to occlusal/ chewing forces. If so, it has to be filled again and gum will heal once broken material is removed, you can try among orasore gel, rexidine m forte gel, dentogel, dologel CT etc whatever is prescribed by your dentist at that time. If filling breaks again and again, ask for capping as a Permanent solution.