Insinuating
    thoughts (waswaas) of divorce
Question

                Salamu Alaikum:
  My question pertains to divorce in Islam. 
  I have been married for a year and early on in my marriage I had strong
      and constant thoughts about divorce. The divorce thoughts consisted of my repeating
      "I divorce you" on many occasions in my head. I have NEVER repeated these things
      out loud and they were only thoughts in my head. 
    I no longer want to divorce my wife and would like to stay with her. Is it
      possible for divorce to be valid just by repeating the thought in your head? Is it haram
      for us to stay together?
  Please respond as soon as possible as this has been haunting me for the
      past year.
Praise be to Allah.In cases like this, the divorce is not valid, for two reasons:
It is only in your mind, and has never been expressed either verbally or
        in writing.

The divorce of a person who is afflicted with waswaas
        (insinuating thoughts from Shaytaan) is not valid because this is something that he has no
        control over, and it carries no weight in sharee’ah.

And Allaah is the Source of Strength.