What's wrong with me?!

Please tell me I'm a bad person. I need to be told.

I'm married, but I have been having dreams about cheating on my husband. I even find myself day dreaming about having an affair with a man I work with.

Wtf is wrong with me? My marriage is I'm shambles and I'm miserable. But that's no excuse to have these thoughts. I don't know what to do anymore.