Before your question can be answered, one should understand what marriage is. Marriage is a social contract. Just like any other contract, this contract also has to fulfill certain requirements. For example, in most cultures one has to complete the paper work and formally get it registered with the relevant authorities. In other cultures, there must be an open verbal announcement. Open verbal announcement means one should have witnesses, who can later testify that the contract actually took place if required. If there are no witnesses or there exists no paper work, no court in the world is going to accept that any contract took place.
Similarly, when one wants to get out of a marriage contract, one should either do the paper work or should make an open verbal announcement that contract is not valid any more. If none of these conditions are met, there are no legal grounds to say that contract is void.
Now coming to your situation, what you did was spur of the moment thing and you had no real intention of doing that. We hold this point here and take a look at how Quran approaches this issue of marriage contract termination. It requires that when one intends to terminate the contract, he should do so at an appropriate time, i.e., when woman is not menstruating, take two witnesses (who are sufficiently acquainted with the situation, according to Muhammad Asad) and also take God as your witness.
These requirements from Quran are mandatory. When you follow them, then spur of the moment decision would be impossible and the decision to terminate the contract would be well advised. It is further said in the Surah if you ignore these injunctions you would only torment yourself.
You did not follow these injunctions, as result are experiencing a hell of your own making and find yourself hanging in between.
Traditional Islamic jurists are inclined towards the opinion that even if you didn’t intend the termination of the contract, mere utterance of the words enforces the termination. But this is merely their opinion, and it is not binding on you.
IMO Talaaq is not a magic word. It’s not akin to saying “aabra cadabra“ and something happens. I find the traditional jurists’ opinion faulty and worthless. It doesn’t take into account the termination is last resort after you have exhausted all other options. And this is not the case with you, you neither intended it nor your options are exhausted. Just like a marriage is only possible when you are of sound and calm mind and have the intention, similarly termination or talaaq is only possible when you are of sound and calm mind and have the intention. Based on the above reasoning, I’m of the opinion that your talaaq didn’t happen.
You should relax and think calmly if what has been written above makes sense to you or not. Final decision rests with you.