Aetna CEO Mark Bertolini will lose his job if the deal to sell the company to CVS Health closes, but he'll leave the company with about $500 million in stock and cash to soften the blow.

The bulk of that payout will come from shares of Aetna (AET) stock he already owns, as well as the stock options he already has the right to exercise, according to the company's filings.

The 925,000 shares of stock he already owns would be worth $191.5 million at the $207 per share price that CVS Health (CVS) would pay for Aetna in the deal announced Sunday. He would also net $222.5 million from his existing options.

Related: CVS is buying Aetna in massive deal that could transform health care

Of course the deal is not a sure thing. It needs to get antitrust clearance from the Justice Department and courts. And part of the value of the deal is tied to CVS stock, which could fall in value before the deal is expected to close in late 2018.

Investors seem to be skeptical that the deal will close at all, with Aetna shares trading more than 10% below the stated $207 price.

Related: What the CVS-Aetna deal means for consumers

Bertolini would also collect nearly $10 million in cash under a "change of control" clause in his compensation package, according to analysis by executive compensation firm Equilar. That provision would also accelerate stock option vesting that would add another $70 million to his net worth.

Bertolini, 61, has been at Aetna since 2003, and CEO of the company since 2010. Even though shares are trading well below the $207 merger price, they are up more than 400% since he became CEO.