Hi welcome to health care magic forum. As you describe it appears to be a subcutaneous infection or a swwollen gland. i advise you to consult a surgeon for diagnosis and treatment. Other wise it may lead to an abscess
and must be drained. One more possibility is the hernia
It could be a reffered pain from the gastric irritation, so better to avoid the substances irritant to the stomach, like spices, chillies, junk foods, and oily foods. i also advise you to avoid pulses, fish, potato, and other tubers to avoid accumulation of pus.
wishing for a quick recovery and thanks for calling.