Dentist would need to do exam and necessary xray for diagnosis of teeth you feel painful, then you will be given treatment options to choose from of what you want to do with your teeth. Once decision is made, the treatment option is going to be scheduled.

If you are nervous about getting dental treatments, here are options. Please note that these are not replacement of local anesthesia.

1. Nitrous Oxide gas(also called laughing gas)
This gas, which is inhaled by the patient through a rubber face mask, helps people feel relaxed and is one of the most common forms of sedation used in the dental office. Effects wear off quickly after the gas is turned off. This is the only form of sedation under which patients can drive after the procedure and can eat food within a 12-hour period of the procedure. With IV, oral and general anesthesia, the patient cannot drive following the procedure or eat after midnight the night before the procedure.

2. Oral sedation, anti-anxiety medication
Explanation follows.
Commonly, after exam and necessary xrays, Halcion is prescribed and recommended to take 1 pill 30 minutes before your next dental appointment for treatment. You have to bring someone with you for a ride because you won’t be able to drive with this medicine as it makes you feel very sleepy.

Reference:
http://www.webmd.com/oral-health/controlling-dental-pain