First of all congratulations on your decision to stop alcohol. This must be a decision that you can always feel proud of.
The description of your condition points to ASPIRATION PNEUMONIA
It means during vomiting
( when your awareness level was low ) , vomitus has entered the airways and reached lungs.
This vomitus is a cocktail of gastric acid
( hydrochloric acid) undigested and partly digested food , bacteria and fungus from esophagus
stomach and pharynx , and alcohol.
All these can damage your lung tissue.
I advise you to hurry to nearby doctor