Remove the filling and keep it safe in a bag or container. Gently brush the affected tooth, removing debris that may have become lodged in the newly exposed cavity. If brushing causes distress, you can also gargle with salt water. Until you get to the dentist, try placing a small wad of sugar-free gum or dental cement in the open cavity.