Your symptoms sound a lot like conjunctivitis, and infection of the outer lining of the lung. Conjunctivitis is also known as pink eye. The question that is most important to answer is whether your infection is due to a virus or due to bacteria. This will effect what management options are best. The best type of physician to see for this problem is a primary care physician
such as family doctor
or internal medicine doctor
Conjunctivitis causes pain, redness, and discharge come from the eye. While yellow discharge is most consistent with a viral conjunctivitis, a bacterial infection cannot always be excluded. Treatment for viral conjunctivitis includes lubrication eye drops which can relieve symptoms. Treatment for a bacterial conjunctivitis is antibiotic eye drops. Another possibility that can explain your eye discharge is an ear infection. If you are also having ear pain or a change in your hearing, you should have that checked out as well.
I suggest that you schedule an appointment with your primary care physician. He or she can take a your temperature, a history of your symptoms, and examine your eye's. If there is any question of whether the infection is bacterial, then you doctor will likely prescribe antibiotic eye drops. Good luck.