Hi,
Welcome to HCM!
Well, it seems what you are suffering from is 
Herpes Zoster infection and it is not caused from sex. What you read over the net is 
Herpes Simplex infection, which is spread from sex and is entirely different from Herpes Zoster.
Herpes Zoster occurs due to the same virus which causes 
Chicken pox. The Chicken pox virus resides in your body forever and may get activated again to cause Herpes Zoster. There are several causes for reactivation and its not clear yet what causes it.
It is a painful condition in which vesicles develop over any part of the body. 
Ensure you take the complete treatment.
One of the most dreaded complication of this is Post-Herpetic 
Neuralgia. It consists of 
severe pain over the site which lasts lifetime.
Ensure you are given adequate painkillers.
Hope this information helps. Feel free to ask if you have any doubt.
Wishing you a speedy recovery.
With warm regards,
Dr. Sridhar Reddy