It's been a tough week for Jamie Dimon, who was once widely referred to as "Obama's favorite banker" but is now managing a record $13 billion settlement with federal regulators.

Dimon has been displaced from his traditional seat across from President Obama to the end of the table during White House meetings with financial institutions, according to the Wall Street Journal. And JPMorgan, the bank that Dimon heads, faces the crunch of a tentative agreement with Attorney General Eric Holder and other federal and New York state officials to settle investigations and lawsuits related to the bank's sales of mortgage-backed securities in the lead-up to the financial crisis.

Even though it includes an unprecedented payout to the government, the deal would not end the ongoing federal criminal investigations of the bank, according to numerous reports. That means insult added to injury for Dimon, a long-time Democratic Party donor whom Obama has called the nation's best banker.

JPMorgan contends that most of the mortgage securities at issue were sold by Bear Stearns and Washington Mutual, two failed firms it acquired during the financial crisis at the encouragement of regulators.

Last year, Dimon said the bank did the government "a favor" by buying Bear Stearns and that he probably wouldn't do the deal again.

But that logic hasn't swayed administration officials, who don't feel they owe Dimon any thanks. Instead, they argue that Dimon and his lawyers knew the risks they were taking and that the Federal Reserve assumed some of the risk of the mortgage securities in the deal. They also point to the billions of dollars in taxpayer assistance the bank received as part of the TARP bailout.

Nor is the $13 billion agreement the end of major government oversight of JPMorgan. It is separate from the roughly $1 billion it paid to U.S. and British regulators to resolve inquiries into its "London Whale" trading losses. The bank also faces probes into whether it engaged in nepotism with its hiring practices in China and whether it had involvement with the Ponzi scheme perpetrated by Bernie Madoff.

Despite the bad news for his company, Dimon, 57, is widely thought to be safe in his job as CEO and chairman of JPMorgan, which, with $2.4 trillion in assets and $32 billion in operating income in 2012, can absorb even a $13 billion hit. Dimon, who received $18.7 million in compensation in 2012, survived a move in the company's last annual meeting to split his CEO and chairman titles.

He continues to project an upbeat demeanor despite the setbacks.

"We're trying to get it resolved," Dimon said of the firm's legal woes on CNBC.

"I am so damn proud of this company ... We're doing great stuff. We're trying to get our problems behind us."