I'm glad you found us and I hope that you will make a decision to stop drinking.
Drinking on and off as you mention, would cause obsessive thoughts for me. I'd always be thinking about when I could next drink, how much, etc. Honestly, stopping for good was easier and I felt freed.
I also used alcohol to self-medicate anxiety/depression/insomnia. It was a huge mistake and made things to much worse. There are healthy ways to deal with anxiety and there are tons of books with constructive ideas on how to manage anxiety and panic.