It seems that you are suffering from some localised infection of the soft tissue
.The greenish-yellow pus discharge is likely to be due to infectious etiology which may be bacterial cause.You should have the pus culture/sensitivity done, blood counts and physical examination by doctor.The pus may need to be drained by incision and drainage
and should be done immeditely without delay.
The oral or parenteral antibiotics coverage should also be given to cover gram postive and gram negative bacteria including anaerobes.
You may need to take the antibiotics course for a period of 5-7 days to control the infection completely.The pain can be controlled by analgesics like motrin
You should NOT delay now and start the timely treatment.