If you experience eye pain and ocular discharge (excluding tears), there’s a strong chance you might have an infection. Viral eye infections usually clear up on their own, but bacterial eye infections can only be treated with medication. If you suspect you have an eye infection, make sure to visit your eye doctor as soon as possible.