All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Your saying to your wife: “I will divorce you” is only a threat of divorce, so divorce does not take place with this statement.
Ibn Taymiyyah said in Majmoo’ al-Fataawa:
“The promise of divorce is not effective even if the wordings used are many, and it is neither obligatory nor desirable to fulfil this promise.” [End of quote]
Your saying to her after that: “You are free” and “Tell him that you are single” are metaphors of divorce, so divorce does not take place without intention.
Therefore, since you did not intend to initiate divorce to your wife, then divorce did not take place.
For more benefit that metaphors of divorce lead to divorce if husband intended divorce, please refer to Fatawa 332467, 327250 and 432442.
Allah knows best.