US President Donald Trump has repeatedly divided opinion at home and faced fierce criticism from overseas.