Swelling in the upper eyelid can represent may things. One is an infection (cellulitis) of the tissue, usually as an extension from a sinus infection. Another is a chalazion (large pimple). Another is an allergic reaction.
If it is an infection, then an oral antibiotics like Keflex would take care of it. If it is a chalazion, 75% will resolve with lots of heat. I usually have patients put hot compresses over the lesion 3-4x/day. After 1-2 weeks, if it hasn't resolved, I would recommend surgery. Sometimes, a chalazion can cause a cellulitis as well. For this, I also add Keflex. For allergies, benadryl, cool compresses, and/or medrol dose pack would help (but if you have seen a doctor, he would be able to tell you if it is allergies or not - if not, benadryl won't help).
Hope this helps and good luck.
I could be from an insect bite. But a chalazion can come to a white head (just like a pimple) as well. Sounds like you may need some oral antibiotics. I would also try the warm compresses for a week before opting for surgery.
Hope this helps and thank you