Welcome to HCM
We understand your concerns
I went through your problem description. I suggest you not to worry too much. The experience could be fantasy or real.
Sperm is a waste product of body. It is produced when you become sexually aroused. The sperm needs to go out of the body. If you do not masturbate or engage in sexual intercourse, the sperm will find its way out through urine or so. If you did not throw it out for a week or so,it is possible to have a mild heaviness around pelvic area. Masturbation
It could be fantasy also. If you masturbate enough to throw the sperm, there should not be pain. Then the pain may be something else.
Hope this clears your doubt. Available for further clarifications.