Pregnancy and dental work

I have a tooth which has a cavity in it and I don’t know exactly if its infected but the tooth aches sometimes. It seems like my tooth would require an emergency extraction( http://www.emergency-dental-365.com/procedures/emergency-tooth-extraction/ ). But I’m almost 15 weeks pregnant and I’m worried how taking dental treatment will affect my baby. It’s giving me trouble on and off for a few days now. I am also worried if it’s infected, is it harming my baby. I can’t live with this pain, but the idea of having the dental work done while pregnant freaks me out too. I was just wondering if anyone has gone to the dentist while pregnant? I have read articles telling against it and some say it’s fine. I am confused. Has anyone gone through such a complication while pregnant? Please share.