Thanks for query,
habit does not cause pimples or rashes.
There are other reason like oily skin,chronic infection,allergic reaction
responsible for it.
so consult your skin specialist for it.
Masturbation is common but you should know that excess is poison.
or yoga to reduce its frequency.