By Roberta Rampton and David Lawder

KANSAS CITY Mo./WASHINGTON (Reuters) - President Barack Obama took his criticism of congressional Republicans to a higher pitch on Wednesday, imploring them to "stop just hatin' all the time" as they voted to sue him over charges he has overstepped the bounds of his office.

In a party-line, 225-201 vote, the House of Representatives authorized the Republican-drafted lawsuit, which will focus on unilateral changes Obama has made to the Affordable Care Act, his signature health care law. All Democrats and five Republicans opposed the measure.

On the House floor, Republican lawmakers reverently invoked America's founders in accusing Obama of bypassing Congress.

"This isn't about Republicans and Democrats, it's about defending the Constitution that we swore an oath to uphold," said House Speaker John Boehner.

But Obama, in a campaign-style speech, made fun of his political adversaries, laughing as he accused them of wasting time instead of addressing more pressing issues.

"Stop being mad all the time. Stop, stop, stop just hatin’ all the time," he said of Republicans, drawing loud cheers from a raucous crowd of about 1,500 in an ornate theater in Kansas City.

Wednesday's vote cemented the Republican lawsuit's status as a lightning rod for months of bitter campaign rhetoric from both parties ahead of elections in November that will determine control of Congress next year.

Republicans have complained loudly that Obama has exercised "king-like" authority in taking executive actions ranging from raising the minimum wage for federal contractors to extending benefits to same-sex partners. But they have narrowed the focus of their suit, to be filed later this summer, to Obamacare because they believe this has the best chance of succeeding in the federal court system.

Obama disparaged the lawsuit effort as nothing but election-year political theater and a distraction from issues such as highway construction or the southwestern border crisis.

Story continues

"There’s a bunch of stuff that needs to get done," he said. "Unfortunately, I think the main vote ... that they’ve scheduled for today is whether or not they decide to sue me for doing my job."

House Democrats said the suit would consume millions of dollars of taxpayer funds but would ultimately fail to undermine the president's discretion in implementing laws.

"This a veiled attempt to impeach the president," said Democratic Representative Sheila Jackson-Lee, a Democrat.

Boehner this week tamped down talk that the lawsuit was a prelude to impeachment proceedings aimed at removing Obama from office. He accused Democrats of trying to promote the idea to whip up anti-Republican sentiment and raise campaign funds.

Another influential Republican, Representative Paul Ryan, told reporters on Wednesday that he backed the lawsuit because he believed it would show clear violations of law by Obama.

"The lawsuit has intellectual merit because we want to show that we're not going to take this lying down," Ryan said at a breakfast hosted by the Christian Science Monitor.

With Republicans in control of the House, Obama's agenda has been thwarted by congressional gridlock, leaving him to take executive actions to make changes where he has the power to do so.

The president has been delivering variations of the fiery stump speech all summer as he tours the country trying to motivate Democrats - and wealthy donors - to get involved in November's congressional elections in the hopes of thwarting a Republican takeover of the Senate.

(Reporting by Roberta Rampton; Additional writing and reporting by Steve Holland and Mark Felsenthal in Washington; Editing by Dan Grebler)