What do General Motors, Six Flags, and American Airlines have in common?

Each filed for bankruptcy and is better off for it today. Their stories of renewal should give hope to employees at Dallas-based Energy Future Holdings, the debt-laden power company facing its own restructuring.

At GM, profits have been rolling in for four years, ever since the giant automaker exited bankruptcy in 2009 after a controversial $50 billion federal bailout. More than $8 billion has been pumped into plant expansions, including in Arlington, where the SUV factory was expanded and a stamping plant added, along with 1,000 jobs.

At Six Flags, revenue has expanded for 14 straight quarters as the Grand Prairie-based theme park chain has attracted more guests who are spending more money. The company’s stock, issued in exchange for debt in the 2010 reorganization, has more than tripled in value.

Meanwhile, American Airlines slashed labor costs in bankruptcy court, and an improving economy allowed its cash balance to grow from $4 billion to about $7 billion. That set the stage for its merger with US Airways, a deal that created so much value that even former shareholders were left with money in their pockets.

What can be learned from these remarkable turnarounds? That bankruptcy isn’t the end, or even the beginning of the end. Rather, court-supervised reorganization can provide new life for companies sidetracked by greed, poor management—or just an ill-timed deal. “We continue to look at bankruptcy as if it’s bad, but it’s not,” says Dan Short, a professor and former dean at the Neeley School of Business at Texas Christian University. “It saves businesses.”

At their core, GM, Six Flags, and American each have viable operations that were buried by other problems, such as a bloated bureaucracy at GM, or debt from a big buyout at Six Flags.

The bankruptcy process forces the hard choices that executives haven’t been able to make on their own. But it doesn’t come without pain or surprises. As creditors gain control from executives and drive tough decisions, jobs are usually lost, including at the top. Executives who steer a company into bankruptcy court are rarely the ones who lead it out.

GM’s fresh start included ditching brands such as Hummer, Saturn, and Pontiac to rightsize its operations, and dumping long-time execs Rick Wagoner and Fritz Henderson. Outsiders were hired as CEO, first Ed Whitacre, the Texan who built SBC Communications, and then former telecom executive Daniel Akerson. A 2010 stock offering gave the U.S. government shares it has since sold to recoup much of its bailout funds.

American needed bankruptcy to cut deals with its unions to bring labor costs in line with competitors that had already been there. Pensions were frozen and thousands of jobs trimmed as some airplane maintenance was outsourced. CEO Tom Horton eventually lost control to creditors who sided with a merger plan advanced by US Airways chief Doug Parker. And the airline is hiring again.

At Six Flags, problems stemmed from a leveraged buyout 16 years ago, which saddled the company with $2 billion in debt. As finances went south, activist investors led by Washington Redskins owner Dan Snyder gained control in 2005 and installed new management. They sold off some parks but weren’t able to right the ship. Unable to make a big debt payment, the company filed for bankruptcy protection in June 2009, hoping for a quick reorganization. But junior bondholders objected and a court fight ensued. A year later, they won the day by agreeing to invest $725 million into new stock and paying off senior lenders. The big debt load was cut in half and Snyder’s hand-picked CEO, Mark Shapiro, was let go. 

Energy Future Holdings has similar problems. The electricity company is smothered by debt from a $48 billion leveraged buyout engineered in 2007 by dealmakers TPG Capital, KKR, and Goldman Sachs. The company put off its day of reckoning in November by making a $270 million interest payment. But if GM, American Airlines, and Six Flags offer any lessons, employees should be hoping it files soon.

EFH has a solid business, producing and selling power in North Texas, that should thrive when freed from the weight of a crushing debt. And while top executives may be losers, there will be winners.

Consider James Reid-Anderson. The Six Flags CEO has received pay packages worth nearly $30 million since taking over after the bankruptcy in 2010, most in stock. Last year, he exercised options worth nearly $20 million and his shares have soared in value, to more than $50 million, as the stock has appreciated. That’s new life indeed.