The British ambassador to the U.S. who criticized President Trump has resigned, the U.K. Foreign Office said Wednesday.