Thanasi Kokkinakis has undergone surgery to try to correct the "mental and physical torture" he was suffering through a long-standing pectoral injury.