I need help, I did something disgusting and hate myself.
Oh no, what happened? What did you do?
I tried to flirt with an old man at my work
Even if you find that you've done something you think is disgusting you shouldn't hate yourself. The next time you find yourself wanting to do something disgusting you should think about trying to not do that.
That makes it worse. I need to forget that other stuff and focus on my work.
Flirting with an older man isn't a horrible thing to do unless you were doing it to gain something. In the scheme of things, this isn't something you should feel horrible about, just think twice in the future.