Please make a visit to the dentist as soon as possible for a proper clinical checkup and an x-ray to evaluate the problem with the tooth so that the right treatment can be instituted based on the diagnosis. Medications will only provide temporary symptomatic relief but will not cure the problem and the symptoms are bound to reappear again.
The problem does not start when the symptoms appear, because there is a concept of incubation period of any infection, and once that infection is established and becomes invasive, symptoms like pain no swelling appear. So if you are having the symptoms today it does not mean that your problem started today.... it had started long time back and has now become more widespread and has involved the nerves.
Regards.
Next Steps
do not delay your visit to the dentist.