you should get back in your house, let her react anyway she wants to, you need to stop feeling 100% of the weight of the responsibility in this situation, she was having an affair regardless of what kind, she was preparing to move out, somehow she turned this around on you (like usual) and made you the bad guy and apparently she feels "betrayed" by you?!
WTF?!
Go home.
Live in your home, if you guys sell the home, it will be after you're divorced, not before so don't worry about any of her threats about selling the home, tell her "that's fine, we'll sell the home after you file for divorce, not before, I don't have to move out until then, you have a place ready for you, you're free to go whenever you want just DON'T tell me what I need to do or that I need to leave, I'll make that decision on my own, thank you"
One more thing, stop arguing with her, you can't win, it's logic vs. emotion and her emotion trumps your logic everytime, you can't explain anything to her, there is no commonsense to work with, better to be quiet & calm & collected throughout all of this instead of joining her in an argument.
As far as the joint custody of pets goes, I haven't heard of that but just agree with her, "that's cool with me, whatever works"