First of all--Good luck with everything. Secondly--I don't care what industry that you work in--hitting on a co-worker is something that should be avoided. Period. Even in the hospitality industry where some would argue that it might be a bit more acceptable--it's still questionable at best--and you should only start with minor playful flirts only if you are clearly invited to do so. The fact that word about what you did spread around your workplace and nobody likes you there is a clear indication that you crossed the line.
Secondly--sometimes--the best love is tough love--and I've been very guilty of presenting my advice to you in a tough love way. This is not going to change now. You really need to get help man. I said earlier that I had a sister that almost died because of addiction issues that led her to make very self destructive decisions. The one thing that you had going for you was a steady paycheck at a job that you were actually starting to like. You managed to ruin that by caring about your junk more than you did about your brain and mental state. Seriously man--you cannot put your issues on the back burner. All the effort that you put into getting laid should be used to get yourself right. I assure you that you will get a lot more tail in the future as a person that makes good decisions, is not an addict, and that is more successful ---because of all of those things. For real man--stop getting in your own way and start taking yourself seriously.
If you still have the job--you need to go up to the woman that you flirted with and clearly apologize and tell her that what you said/did was completely out of line --and that she shouldn't have to tolerate it in her workplace--and that you will not let it happen again. If things are awkward beyond repair--start applying to new jobs, because the more time that you have on your own---the more you can be self destructive. You need to be busy doing productive things--making money through working, going to AA meetings, or seeking free/inexpensive mental health from a professional. This is not about being weak or being strong--its about being smart and about doing what's right. Stop convincing yourself otherwise.