Thanks for your query.Based on what you have described it appears to be severe Genital Mucocutaneous Candidiasis
.infection of the foreskin.Are you diabetic If not tested so far get your blood sugar levels on empty stomach and two hours after lunch done to rule out Diabetes
. and consult some Urologist
for clinical examination and confirmation.Please take some anti fungal medication
like Flucanozole for three days with tropical anti fungal Gel for local application over affected area after consulting your family physician to get prescription of these drugs.It should recover in 10 days.