Praise be to Allah.
If this situation is as you describe, that when you uttered the word of divorce you were not really aware of what you were saying because of severe anger, to the extent that you did not remember what you had said until those who were present told you about it, then this divorce does not count as such. Shaykh Ibn Baaz (may Allah have mercy on him) said: Divorce uttered in a state of severe anger does not count as such, whether it is threefold or a single talaaq, according to the more correct of the two scholarly opinions, if there is proof to support the claim that one was in that state at the time. But if his anger was so intense that he did not know what he was saying or doing, then his divorce does not count as such according to scholarly consensus, as in the case of one who is insane or in a state of intoxication where no committing of sin in involved.
End quote from Majmoo‘ Fataawa Ibn Baaz, 21/275
We have previously discussed the ruling on a divorce issued by one who is angry; please see fatwa no. 45174
A similar case is that of a man who divorces his wife based on something and if it were not for that he would not have divorced her, then he finds out that this matter was not correct, such as if he divorces her thinking that she was having a relationship with another man, then he finds out that she is innocent. In that case, this divorce does not count as such.
See the answer to question no. 36835
To sum up: if the matter is as described, your divorce did not count as such.
And Allah knows best.