For me, I have to be very aware of my emotional state. I have to not ignore it if something in my brain starts toying with the mere possibility of drinking. I have to be rabidly honest with myself. If the thought of drinking crosses my mind, I address it. I call my sponsor and/or another sober alcoholic. I talk it out and I get their advice. I root out what triggered the thought and I disclose it to another human being. Usually, I find myself at a meeting later that day and I again hang out and talk.
Basically, I don't sweep my emotions or thoughts under the rug anymore. I stop the drink before I even pick up my keys to go to the store. That's type only way that's worked for me so far.