The more you describe your condition the more it sounds like mercury toxicity. I think replacing your filling is the right thing to do.
It's also important to understand that filling replacement is just the first step. Mercury will still be stuck in various places throughout your body. The next step will be chelating the mercury out. For that you will need to follow a chelation protocol (for someone who's new to chelating, I suggest the Cutler Protocol). Chelation can be a long slow process, but it's very important for recovering your health.
Make sure you find out as much as you can about a particular chelating method before you try it. Chelating is not completely safe if not done properly and definitely wait until after you replace your filling before beginning.