While touting his achievements, he painted a picture of a nation tested by racial, economic and social strains, and in comments that appeared to be a reflection on the fury and division opened by the election in which Trump beat Hillary Clinton last year.