In Japan, it is known that a doctor's bill is so expensive even for people having public insurance, therefore for travellers to Japan, it is recommended you take out a traveler’s insurance policy.
If your illness is not so serious, you can go to a drug store and get over-the-counter medicine, then, stay in bed till the recovery. Pharmacies or Drug stores are called “Doraggu Sutoa” = Drug store in Japanese. To find Japanese phrases to use when buying medicine at a drug store, see eigo-samples.com. To find Japanese phrases to use when buying medicine at a drug store, see eigo-samples.com
If you feel your illness is serious and need to go to a hospital immediately, you can search for hospitals in Tokyo on this web site.
For medical emergencies, it is advisable to ask someone who speaks Japanese and call an ambulance (119). Hopefully, calling up an ambulance should be the final choice as you may be taken to a large hospital far from the place you stay.
Public Health Insurance Systems in Japan