ok finally got some time , post edited!
So if you are willing to quit it in the short way then just ignore anything which makes you do those compulsive behaviors .. At first .. this will bring you some stress and disturbance but even with all that try to avoid it for sometime.. and you'll notice that you threw that thought out of your mind and now you are kinda relaxed! the second time it appears .. do the same .. and soon the impact of those thoughts will decrease.. In short, don't think .. don't think about anything .. don't perform any compulsive behaviors .. don't try to do it even once .. you may fell for it! .. Just .. don't do anything .. Ignore! or lets say just Forget about it! .. Carry on with your life .. do something else , don't give your thoughts so much attention or importance! ..
Try that , and see if it helps!