Dogs don't do dirty protests. If he wets or messes when you leave him it will be through fear/anxiety.
He needs to learn how to be on his own and that's going to take some time and quiet a bit of effort on your part.
MostAmused's advice is right, you need to get him used to be left extremely gradually. So you'd start by giving him a kong or long-lasting chew/treat and sitting just a couple of feet away, gradually building up to sitting on the other side of the room, then the other side of the baby gate. If at any point he's too anxious to eat the treat or he obviously can't cope you need to go back a couple of steps, get closer and work up even more slowly.
Teaching him to settle on a specific mat can be really helpful for this, as you will already have taught him to lie down and be calm on that specific mat in your presence, so leaving him is then just an extension of that. It's also is something that can then be a really useful skill for him to have when you take him out and about or on holiday with you. There's a good article and links to videos for this here.
Alternatively, crate training would give your dog a place to feel calm and safe when you're not with him, but again, this would have to be done properly in order to make sure he has nothing but positive associations with the crate. You would need to crate train him to be relaxed in the crate with you right next to him first and then very slowly work up to you sitting a bit further away and eventually leaving the room etc.
Either mat or crate training would help him to learn that he has to stay on the floor in your bedroom too.
Loki if your dog is ok when left with someone else or another dog, it sounds more like isolation distress than separation anxiety.
Two really useful books to read so you can get your head around how separation anxiety occurs and how to treat it are:
Don't Leave Me, Nicole Wilde
Treating Separation Anxiety in Dogs, Malena Demartini-Price
One of my dogs has a tendency towards separation anxiety and was a nightmare as a pup. He'll be two in June, can now be left for an hour and is finally ok with me going upstairs or outside without him (he used to yell the place down if I was just the other side of the door). He's an anxious lad generally and we've had to do a lot of work on building his confidence through fun training etc, as well as working on the separation anxiety itself. He has true SA, as he's not comforted at all by the presence of our older dog, even though he absolutely adores him and still cries for me if left with my dh or someone like my Mum.
My older lad developed isolation distress when our old girl died a couple of years ago. (He's happy as long as he has company, be it another dog or person, even if they're not actually in the same room - just in the house somewhere.) We thought that when we got our pup he would be good company for him, unfortunately, being a rescue the new lad had a bad start in life and his separation anxiety was a hundred times worse that our older boy, so actually made the situation worse. 
One thing I would say is, I am a sahm too and it's really easy to fall into the trap of spending all day every day with your dog, so that they never learn to be content with their own company. I now make sure mine spend some time every day - even if it's just half an hour or an hour - settled on their beds with the door closed while I do something elsewhere in the house. On the occasions where I've been ill, so perhaps lying on the sofa, close to them all day, the younger lad slips back into SA really quickly, so it's something you need to keep up, even when you think they're over it.