Hi
According to the X-ray, there is deep caries involving the pulp of teeth and there is infection at the base of root of the same teeth. The treatment of choice is Root Canal Treatment (RCT). There are various factors to be considered for RCT to be successful and you need to visit a dentist to know about the same. Taking pain killers is only a temporary option.
Next Steps
Visit an Endodontist for further treatment
Health Tips
The more you delay the treatment, the more pain you will experience and it would be difficult to save that teeth. Please visit dentist at the earliest and get the treatment done.