Can masturbation be the cause of acne and pimples?

Also, I've been taking doxycycline 100 mg for last 9 months without letting my doctor know about it? My doctor prescribed 2 months of dose but I took it for 9 months.

Can this be somehow harmful?