Hi ! From your history, it seems that you have got some kind of perianal infection which is giving rise to the perineal swelling and discharge off and on. I would suggest you to get yourself examined by a general surgeon
at the earliest possible to avoid more complication. In the mean while, you may get your blood sugar tested as a routine. Wishing you an early recovery.