SÃO PAULO—Brazil’s troubled economy showed more signs of deterioration on Tuesday as consumer confidence sank to a record low and unemployment climbed.

It is the latest blow to a country beset with high inflation, a slumping currency and a festering corruption scandal that has left President  Dilma Rousseff with approval ratings in the single digits.

More bad news is expected Friday, when a report on gross domestic product is projected to show that Brazil’s economy is officially in recession.

Slowing Chinese demand for commodities has slammed Brazil’s economy, while a massive graft scandal at state-run oil giant Petroleo Brasileiro S. A.has forced a sharp cutback in investment in the critical oil-and-gas sector, sending shock waves through the rest of the economy.

Nervous businesses and consumers have trimmed spending, fueling layoffs that have further weakened demand. In 2015 through July, Brazil has lost nearly a half-million jobs, according to the Labor Ministry.

“Falling consumer confidence and a worsening labor market move hand-in-hand,” said Cristiano Oliveira, chief economist at Banco Fibra in São Paulo. “We’re going to see demand slow down even more in the next few quarters, and I don’t see anything that can change that.”

Joblessness hit 8.3% in the second quarter, according to the Brazilian statistics agency’s three-month unemployment calculation. That is the highest level since the series began in 2012.

Rising unemployment has Brazilians increasingly concerned about the state of the economy. The country’s main consumer confidence measure sank to 80.6 points, the lowest since that series began in 2005.

Slower economic growth in China is adding to Brazil’s woes by pushing down prices for many of its commodities, including iron ore and soybeans. China is Brazil’s biggest trading partner, and just last month the world’s biggest iron ore producer, Rio de Janeiro-based Vale SA, said that its revenue plunged 29.7% in the second quarter from a year earlier.

“Brazil is already feeling the effects of the slowdown” in China, Brazil’s minister of development, industry and foreign trade, Armando Monteiro, told reporters on Tuesday.

He said lower commodities prices cost the country $12 billion in foreign sales in 2015 through July compared with the same period a year earlier. “If this situation gets worse, then the effect will obviously get bigger,” Mr. Monteiro said.

In recent years, Brazil’s government tried boosting economic growth by cutting taxes and encouraging state-controlled banks to lend more. That stimulus led to growing budget deficits and ballooning debt. With Brazil’s investment-grade credit rating now at risk, the government is attempting to raise taxes and cut spending, which is further weighing on economic growth.

“The government isn’t stimulating domestic demand anymore, so we’re seeing a correction now,” explained Flavio Serrano, an economist at BES Investimento in São Paulo. “Last year, for example, we saw an increase in demand because of government measures, but that generated imbalances.”

One of those imbalances was a growing current-account deficit as the government’s measures spurred imports.

But with Brazil’s currency, the real, more than 30% weaker against the dollar than a year ago, demand for imported goods is slowing and parts of the current account balance are starting to look better.

Brazil’s central bank reported Tuesday that the current-account deficit was $6.2 billion in July, up from a deficit of $2.5 billion in June. The jump in July from June was lower than some analysts expected, and it was caused mostly by investors selling fixed-income assets. There has actually been a big improvement in the 12-month accumulated figure since the start of the year.

Brazil’s 12-month current-account deficit narrowed to $89.4 billion through July, from $104.7 billion in 2014.