Thank you for your question.
Its so good that you are still concerned about your faith and that is a positive sign. Always keep on praying to Allah and dont lose hope in Him.
As for your question, it would be difficult to answer in just a few lines. I would advise you to consult a RELIGOUS counsellor or an aalim to help you through your problem.
InshaAllah with Allahs help and a strong willpower, you will be able to get over your thoughts.