depends on proper timing of unprotected sexual intercourse and ovulation time or fertile days. If you get your period regularly, then above habits do not interfere with your pregnancy.
You can consult with a psychiatrist
or counselor to get rid of from this habit. You need some medication to control this type of habits. Spend more time on movies, listening music, books etc to distract mind from such things. Do regular meditation
for 30 minutes.
Wish your good health. Be well.