All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
First of all, we find it strange that this incident happened more than three years ago and it is only now that you are asking about the Islamic ruling. At any rate, if you divorced your wife twice [two divorces] and you did not take your wife back between these divorces, then the view of the majority of the scholars applies to you: their opinion is that the successive divorce takes place even if it is not interrupted by the husband taking back his wife.
Also, the divorce pronounced in a state of anger takes place unless one totally loses consciousness. For more benefit, please refer to Fatwa 121374.
Therefore, if you were conscious when pronouncing divorce, then your wife is thereby irrevocably divorced from you with major separation and she is not lawful for you until she marries another man in a serious marriage, and they consummate the marriage without the intention of making her lawful for you, and then her husband divorces her or dies. For more benefit, kindly refer to Fatwa 82541.
The same thing applies if you pronounced divorce while under the effect of the drug. If you were conscious, then the divorce took place, and if you were unconscious then the divorce did not take place.
Please also be advised that writing down the divorce is a metaphor of divorce, so if the husband does so with the intent to divorce, the divorce takes place as we have clarified in Fatwa 147535.
On the other hand, you should know that you committed a grave sin when you used that amount of sleeping pills that contain intoxicating ingredients, as they could have caused your death. Allaah says (what means): {…and do not throw [yourselves] with your [own] hands into destruction.}[Quran 2:195] Allaah also says (what means): {And do not kill yourselves [or one another]. Indeed, Allaah is to you ever Merciful.}[Quran 4:29]
Therefore, you are obliged to repent. Please review the conditions of repentance in Fatwa 86527.
Allaah Knows best.