The dog bit me! What should I do?

This isn't about periods or conceiving or anything so I'm not sure where to post it. I'm sorry if its inappropriate for a forum like this..

I live with my MIL who has three dogs. My SO, MY dog, and I are staying here temporarily while we wait for an apartment to become available.

One of my MIL's dogs, Max, is an ass. I love dogs and I'd never met one I didn't like until I met Max. He's always humping my dog and my MIL's other two dogs, he pisses everywhere, he barks at everything, and he gets extremely aggressive.

So today, Max was pestering my MIL's other dog. I didn't see exactly what happened, just that the other dog kept yelping and Max was on top of her. So I tried to shoo him away, but he wouldn't stop. So I got the spray bottle and squirted him but that didn't help. The other dog was yelping and crying so I tried to pat Max on the butt to get him to stop and he bit me! Hard! He didn't break the skin but my arm feels bruised and he definitely left a mark.

What should I do? He does this kind of thing a lot but this was the first time he actually hurt me. I've talked to my MIL about it but she doesn't know what to do either. We can't move out until August because there's nowhere to go unless we want to live in a homeless shelter. And I honestly don't want anything bad to happen to Max, but what can we do?!

We've tried a shock collar, spray, one of those whistles that dogs hate....nothing works!

Any advice would be greatly appreciated.