I'm going to use the opposite gender's bathroom for an emergency
Why do you need to use the other bathroom just because it's an emergency?
As I just told you if it is an emergency then I might use the floor.
Normally I would say you should stay out of a bathroom of the wrong gender, but you had an emergency. In this case I would not worry about it if I were you. You might have used the floor instead which would be even more wrong to do.
I want to do this to piss off people and make them mad with me.
Well in this case I do not think there's even an emergency and I do not think it is appropriate to pee or to poop in a room not designated for peeing or pooping. People can find that weird and if this is your workplace it may get you fired or get you to be charged with sexual misconduct.