I’m going to stop drinking for a while

I‘ve found myself drinking quite a bit lately and not really to enjoy the drinks but to drown out the sorrow and so I can go to sleep without laying in bed staying up thinking. I also just broke up with my girlfriend who I’ve been living with for almost a year and I feel like it’s only going to get worse. I’m gonna try to stop now before I find myself in an ugly situation. Any advice?