The 34-year-old, whose Bayern contract expired at the end of last season, completed a move to Russian outfit Zenit St Petersburg earlier this month.
"It was very hard to say farewell, but it's always been like that, whenever I've left a previous club," he told Bayern's official website.
"It's always a difficult decision when you choose to move on, and it affects the family too, especially when you're playing with such a good team like here in Munich, at an amazing level and with such great success. We all get on very well with each other, and I'll certainly stay in touch with a number of the players. I've had four superb years."
"There have been so many good moments. I've had four outstanding years here, with many moments I'll never forget. The first championship in 2010, and the treble this season were outstanding, only seven teams have ever managed that."
The veteran midfielder previously represented Zenit between 2007 and 2009.