Brazil is going through a rough patch, but they'll be okay in the long run.
Already, Brazil is an upper-middle income country with a GDP over $2 trillion. Per capita their GDP is about $15,000, which is above the world average and about half that of Portugal or Poland. Their life expectancy is 74, also above the world average and only a few years behind the US.
For the last few years, Brazil has been in a recession; it actually seems to be a stagflation recession similar to what the US went through in the 1970s. They've had inflation rates around 10%, which is high, but by no means unbearable. Their unemployment is around 8%, which is, again, high, but not catastrophic. Their fiscal deficit is about 10% of GDP, another moderately bad sign. All they really need to do is cut each of those numbers in half and they'll be just fine. (The people calling for them to achieve fiscal surplus frankly don't seem to grasp how fiscal policy works. Countries almost never run fiscal surpluses, even in the best times; and they simply don't need to. As long as your fiscal deficit is less than your growth in nominal GDP, you can do that forever.) To do that, cut some government spending that isn't very productive (military, perhaps? You could probably shave off 1% of GDP that way), raise interest rates a little, maybe implement some active labor market policies to help people find jobs, and then relax, because it's really not so bad. The US and Europe have been through worse recessions than this, and we're fine.
The minimum wage hikes and price controls they implemented in an attempt to counteract the inflation didn't work very well, and many economists think that Brazil's government has taken too much of a hands-on approach in general, micromanaging the economy rather than letting markets do their work. This is probably true; but to be honest I don't think this was Brazil's main problem. I think they were hit by the global Great Recession just like everyone else.
While they seemed to weather the 2009 Great Recession relatively well (largely because they did not allow securitization of mortgages---I think we might learn a thing or two from them on that one), I think the loss of exports damaged their medium-term finances and was a major factor in causing this later recession that hit them around 2012. President Rousseff didn't just arbitrarily decide to increase public spending for no reason; she did so in response to a loss of global aggregate demand and rising inequality within Brazil. I actually think the high public spending may have helped Brazil---their peak unemployment wasn't as bad as the that in United States, after all.
The recent drop in global oil prices has hurt Brazil's recovery, as their government budget is partly funded by their nationalized oil company. China's slowdown as they realize the hard way that no amount of good policy can sustain 9% GDP growth indefinitely has also hurt Brazil's exports.
The one thing I'm really worried about for Brazil is their political instability. Their current government is extremely unpopular, and perceived to be quite corrupt. There are even rumors of people that support a coup, though so far these seem to be a few rare extremists. If Brazil actually had a coup, they'd be in big trouble. But as long as they can keep their democracy going and hopefully even clean up some of the corruption, they should be fine.
It wouldn't hurt to get rid of some of the price controls and streamline some of the regulations. But I don't think that was ever really the problem, and I don't think getting rid of them is necessary for the solution.