Hello,
The pain and discolouration of the tooth are because of tooth decay. So, you should visit a nearby dentist and get an IOPA(x-ray) of this tooth done which will decide the future treatment (restoration or RCT).
Meanwhile, you can follow certain instructions to avoid pain advancement:
-don't eat from the affected side.
-Start doing warm saline rinses (a pinch of salt in lukewarm water) 3-4 times a day.
-avoid anything like sweets, extreme cold and hot stuff that might trigger the pain.
Next Steps
Visit a dentist and get an IOPA done.
Health Tips
Visit as soon as possible before the pain gets unbearable.