Hello ,
Only using medicine will not help as the causative factor which is the tooth that is not treated. Medicine will help in subsiding the pain but not remove the infection completely . If that tooth after clinical n radiographic examination can be saved then you should get a root canal done , otherwise the tooth need to be extracted.
Next Steps
Visit a nearby dentist as soon as possible