I had an attack where the skin under my toes split.
I also had a major infection in one big toenail - right back to the roots.
As I was so worried about it, the doctor prescribed a full course of treatment of low dosage anti fungal pills which I was on for about six months.
I also had some anti-fungal nail paint which I applied every couple of days.
Boring as hell, but it cleared all my fungal infections eventually.
So there should be stuff that your doctor can approve and/or prescribe for you.
The over-the counter treatments have caveats about what kinds of infections that they treat.
In the case of infected nails if the infection is all across the whole nail then they are not suitable.
I felt that there was no point in just treating under my toes when I had a permanent source of infection in my toe nail which would just reinfect the rest of my foot.
Bottom line, check with your doctor!
Cheers
LGC