C., you have two separate things going on.
1. You are in an abusive relationship.
2. There is some (probably) mutual attraction going on with your boss.
I know they feel connected to you, but they're not.
When you're in an abusive (or even just unhappy) relationship, the natural, almost universal thing to do is to be attracted to someone else, and to dream that that person will "rescue" you. That's normal and understandable, but it never, EVER works in real life.
What you need to do is very clear and simple. Get OUT of this relationship. Stay in a shelter if you need to, but leave today and do not go back.
And then, quite simply, do not have an affair with your boss. Forgive me for being a bit blunt on this last one, but there's a name for people who have affairs with their bosses. You know what it is? Unemployed.
You need this job. You need this income. It's fine to THINK about your boss. But you have to be really brave and strong right now. And that means getting away from your husband -- fast -- and not acting on these attractions, not even a little bit.