Is there a way to nip my eye infection before it gets worse and more painful?

See your doctor. I know you don't want to hear it, but in order to know what kind of infection you have and how best to treat it, your eye doctor should be consulted. Some infections (like pink eye) will go away on their own. Others, such as bacterial infections from contact lenses or eyelid infections, can be visually devastating if improperly treated. And most infections can be easily treated with eye drops.
See your doctor. Have the infection identified, or see if it is really an infection, and then receive and follow through with the appropriate treatment and followup.