Former England batter Gary Ballance announced his retirement from cricket on Wednesday, four months after leaving Yorkshire following the racism scandal involving Azeem Rafiq.