The only way for Cameron to fix the country is to overturn the referendum and resign
He's resigning regardless. He can't overturn the referendum; that'd lead to outright dismissal of Parliament & the government. Yes, it's technically non-binding, but they have to respect it.