You might have a sty. They don't hurt at first. If this is the case, use a cold compress, as another poster said. Gently wash your eyelid with baby shampoo. Use a very small amount. A sty is basically a pimple on the eyelid. It can be inside or outside. It will run it's course, then drain and go away. If you're worried it might be something more severe, see a doctor.
One good answer already given- it depends on the cause. Two bad answers: - Polysporin eye comes only as an ointment and by prescription only, at least in the US and nothing in the description makes it sound like it would be helpful anyway. Cold may be the wrong thing to apply. In most cases heat is the answer depending on the cause. - Does not sound like a stye from the limited description. Whether it is or not baby shampoo has no benefit except possibly for the warm water used with it. It is what you want to use if lids stuck shut with gunky material and not opening with just plain warm water. The question only states almost fully closed and nothing about lids stuck together.