For temporary, you can brush you teeth and let it bleed. That way you can relief for couple days. It is because you gum is swallen right and the teeth is rotten which is pinch your nerve right now that is why you feel painful. Of course, you still need to see the dentist asap, but for the mean time, you can try that so you would not have to suffer that much.