Destabilization of the Zhang-Rice singlet at optimal doping