BRASÍLIA — To those unfamiliar with the cacophonous tenor of Brazilian politics, the legislative session on Sunday night that approved the impeachment of President Dilma Rousseff could have been mistaken for a soccer match.

As the outcome of the vote became clear, deputies in the lower house of Congress hooted, pumped their fists and hoisted onto their shoulders the man who had cast the pivotal vote.

One lawmaker, wearing a flag as a cape, fired a gun that shot confetti.

The unrestrained merriment was mirrored on the streets of cities across Brazil, where thousands of people celebrated what they hope will be the ouster of Ms. Rousseff on charges that she illegally used money from state-owned banks to hide a catastrophic budget deficit and bolster her chances of re-election.

But on Monday, Brazilians awoke to the sobering reality that the political and economic turmoil that has consumed their country, Latin America’s largest, for the past two years is far from over.