My little furbaby used to pee on my bed ONLY on my husbands feet..I finally made him stairs ...Mason is 1yr old and still doesnt always pee on his pads or poo for that matter. It can be very frustrating and I understand how you could get so upset. Please learn to just walk away when you get upset. Try and put your Maxi on a potty pad when he pees on the carpet or floor and tell him "Potty here Maxi" Try and stay positive with him and not let him see you upset 

It will all be ok   
Little dogs arent easy to Potty train