It won't harm anything - but it also may not help. Is there any swollen tissue you can see between the eye and the scale?
When that tissue becomes inflamed, oftentimes the entire ring of tissue will eventually swell. That's not the case with your snake.
When it's localized to one area like in the picture you posted and there appears to be no other inflammation, it could could be several things. The easiest to deal with would be a small piece of retained spectacle edge or something else that lodged in there. Those are things that can be manually removed or flushed out.
Without being able to physically look at it, I can't tell whether or not it's an irritation under the rim of the ocular scale or something else like a cyst.
While the gentamicin may help against the spread of a possible bacterial infection, if it's a cyst or other growth it won't do anything. the best advice I can give is to take the animal to a vet and get them to take a look.