* KPMG worked for Gupta family, friends of president Zuma
* Guptas accused of improperly influencing government
* KPMG apologizes, donates fees earned to charity
* Scandal has piled pressure on Zuma, split ruling party (Adds comment, details, background)
JOHANNESBURG, Sept 15 (Reuters) - Global auditor KPMG cleared out its South African leadership on Friday after damning findings from an internal investigation into work done for the Guptas, businessmen friends of President Jacob Zuma accused of improperly influencing government contracts.
KPMG's investigation did not identify any evidence of illegal behavior or corruption but it did find that work done for Gupta family firms "fell considerably short of KPMG's standards," the auditor said in a statement.
It became the third global firm to be damaged by work carried out for the Indian-born brothers after public relations agency Bell Pottinger - whose British business collapsed this week - and consultancy McKinsey.
Both Zuma and the Guptas deny wrongdoing and say they are victims of a politically motivated witch-hunt. The Guptas and their companies have not been charged with any crime.
"This has been a painful period and the firm has fallen short of the standards we set for ourselves, and that the public rightly expects from us," new South African CEO Nhlamu Dlomu said.
"I want to apologize to the public, our people and clients for the failings that have been identified by the investigation."
KPMG said it would donate the 40 million rand ($3 million) it earned in fees from Gupta-controlled firms to charity and refund 23 million rand it earned compiling a controversial report for the South African tax service.
South African chief executive Trevor Hoole, chairman Ahmed Jaffer, chief operating officer Steven Louw and five senior partners all resigned.
"I absolutely understand that ultimate responsibility lies with me," Hoole said in a statement.
KPMG is also seeking to take disciplinary action to dismiss Jacques Wessels, the lead partner on audits of Gupta-linked firms, it said. Wessels did not answer a call to his mobile phone seeking comment.
Andrew Cranston, former CEO of KPMG in Russia, has been appointed as interim chief operating officer.
The three Gupta brothers, Atul, Ajay and Rajesh, came to South Africa in the early 1990s and built a commercial empire stretching from computers to mining and media. The family has employed Zuma's son Duduzane as a director of one of its subsidiaries.
The brothers have rejected accusations by a public watchdog of corruptly influencing Zuma, in one of many scandals that have damaged his presidency.
The turmoil at KPMG follows the placing into administration of the British arm of Bell Pottinger on Tuesday, after clients deserted it because of a backlash over a racially charged political campaign it ran for the Guptas.
Global consultancy McKinsey is also being investigated by South Africa's parliament over whether it knowingly let funds from state power utility Eskom be diverted to a Gupta company as a way of securing a $78 million contract to advise Eskom.
McKinsey is carrying out its own investigation, but has denied wrongdoing.
The Gupta scandals have piled pressure on Zuma and opened a deep divide in the ruling African National Congress, the party that has ruled since Nelson Mandela swept to power at the end of apartheid in 1994. It is due to elect a new party leader in December.
David Lewis, chief executive of Corruption Watch, an NGO that has been at the forefront of efforts to expose alleged wrongdoing by the Guptas and those around them, doubted that KPMG had really turned over a new leaf.
"Good riddance - it's great they've gone," he said. "But it's got to go to the culture of the firm, quite frankly. I doubt that people of that seniority were conducting themselves in a manner that doesn't reflect the culture of the firm." ($1 = 13.1966 rand) (Reporting by Joe Brock, Ed Cropley, TJ Strydom, Olivia Kumwenda-Mtambo, Mfuneko Toyana and Nqobile Dludla; Writing by Joe Brock; Editing by Mark Trevelyan)