Thank you for reaching out to us.
We are sorry to hear of your eye infection, and we wish you a refuah sheleimah.
Submersing the entire body at the same time is a requirement for a valid
immersion. At the same time, halacha deeply values medical safety.
We recommend consulting your physician about whether dunking quickly just once and arranging to do it right after the water is treated would be considered medically safe for you.
If that would not suffice, please get back to us with more information about the nature of your physician's concerns, at what point in time they would likely be alleviated, and the minimal protection your eye would need for a dunk now (e.g., could it be with a porous material).
Please don't hesitate to follow up with us. We hope your recovery will be quick enough to make this response moot.