Thanks for your query,based on the facts that you have posted it appears that you have chronic infection of the foreskin (Posthatitis).
Get your Blood sugar levels tests done to rule out Diabetes.
You need to take broad spectrum antibiotic like Cefexine along with anti inflammatory drug like Diclofenac
twice daily.along with topical antibiotic
ointment like Neosporin
If you get repeated episodes of this infection even after taking antibiotics consult qualified General surgeon
for clinical assessment .You may need to get circumcised .This will solve your problem permanently.