Manchester United can confirm that Juan Mata will depart the club when his contract expires this summer.