The U.S. president issued a call for unity as the country appeared divided after a difficult week.