He thought about divorcing his wife and uttered the words to himself in a low voice
Question

                I had an argument with my wife. Her mother and her made me very angry, I was in a very bad mood, and I was in the same state for a number of days. While in this state and on my way to the masjid I imagined that we returned to Egypt and that we were amongst a group of people and I said to her: “you are divorced, divorced, divorced” I said this quietly. This situation happened again, but in the second situation I said: “I will please you, you are divorced” I do not know if my lips moved or not when I said that. One or two days later, I realized what I have done and felt like this has happened three or four times, but I do not remember except the above mentioned two situations. I have divorced her once few years ago: “you are divorced” she was on her period then. Please bear in mind that I suffer from the lack of concentration, and it is in my nature that I talk a lot to myself if I am concerned about something, this might be aloud. Please guide and advise me.
Praise be to Allah.Firstly: 
In the case of clear 
    divorce, such as when a man says “You are divorced” or “My wife is divorced” 
    it is not essential that there be the intention of divorce. It counts as 
    such even if one did not intend it, but it is essential that the person 
    should intend to utter the words and understand the meaning of them. Hence 
    if one who is asleep or who utters the word of divorce absentmindedly, 
    without intending to utter them, his divorce does not count as such. The 
    same applies if a non-Arabic-speaker utters the word of divorce (talaaq) 
    without knowing its meaning – it does not count as a divorce. 
Based on this, what you 
    have mentioned about your imagining a meeting with your family and issuing a 
    divorce to her twice, and this happening three or four times, and your 
    saying that in a low voice, does not count as divorce, because it was either 
    something that you thought of to yourself, which is forgiven, or you did not 
    intend to utter the word of divorce and make it happen at that moment, and 
    you were only thinking of what would happen in the future, but you did not 
    want to issue a divorce at that moment, especially since you mentioned that 
    you suffer from lack of concentration and absentmindedness, and that when 
    you are worried about something you talk about it to yourself, and that may 
    be in a loud voice. 
With regard to your 
    divorcing her when she was menstruating, this is a haraam divorce according 
    to scholarly consensus; you have to repent from it and resolve not to do it 
    again. If you consulted a scholar at that time to ask whether it counted as 
    divorce or not, you should follow the fatwa he gave you. 
And Allaah knows best.