Pellegrini announces departure from Man City