If I don’t masturbate, semen (like clots) discharges from my penis, particularly after urination. After a few minutes of discharge I feel pain in penis.

Whoa, Nellie! This is a "horse that is running away from the barn". A Urologist is your best bet to find out why the "barn door is unlocked". Please make an appointment soon.