OWINGSVILLE, Ky. — Former Vice President Joseph R. Biden Jr., in some of his harshest criticism of President Trump to date, said on Friday that the president was “trashing American values” and undermining institutions to “amass power,” as he appealed to his party to not give up on winning the votes of the white working class.

Campaigning in rural Kentucky for a Democrat running in one of the nation’s most watched House races, Mr. Biden appeared to be testing themes for a potential 2020 campaign to unseat Mr. Trump.

“He is just trashing American values the way he talks about people, the way he makes fun of people, the way he denigrates folks,” Mr. Biden said. “I got to tell you, I think there is a method to his madness because he wants you to get down in the mosh pit with him.”

On Friday, the former vice president came to this town of 1,500 to campaign for Amy McGrath, a retired Marine combat aviator, in a district where Democrats’ fortunes have profoundly eroded. On Saturday, the president is scheduled to campaign in another Republican stronghold in the district for her opponent, Representative Andy Barr.