Welcome to healthcaremagic,
You know your problem and you want to get rid of it, To me you are having Obsessive Compulsive Disorder
type of problem. Now a days many good medicines have come in the market to treat this problem and also psychotherapy/behaviour therapy
etc. You need to see a Psychiatrist
to find out the real diagnosis of your problem. Once it is done, the treatment is easy.