People have different ways to combat the urge to drink. What works for me is asking myself two questions: one, will drinking improve the situation? And two, do I want to wake up tomorrow full of regret and self hatred and feeling sick? So far that's stopped me from drinking.
Some people get relief by going to meetings. If you haven't tried AA it might be worth a try.