Former England midfielder Joe Cole has confirmed that he has left West Ham following the expiration of his contract.