The 38-year-old had to control his emotions as he drew a loud and heartfelt standing ovation from his home public during the presentation of his 103rd career trophy.
Federer, 37, appeared firmly on course for a place in the quarter-finals at a set and a break up before an impressive comeback from Tsonga took the second-round match to a decider.
Second-seeded Zverev struggled on serve at times and finished with seven double faults but he fired 12 aces and converted four break points to advance after an hour and 45 minutes.