Thanks for the query.
According to your description the swelling could be a Bartholin cyst
When the duct of the gland gets blocked it will format a cyst.
When the cyst gets infected it can from an abscess
. That will contain pus and blood.
As you are having recurrent attacks, better to consult gynecologist once and get examined.
You may need one course of antibiotics to cure the infection.