Particularly at a Mega Corp, like Scuba states most times there's no upside in announcing early, and always exposure to downside. If you're retiring around a specific date driven eligibility event you should wait until after that date. This comes into play if you're in bonus eligible positions and/or have an accelerated age based vesting of stock grants (as I was). It probably also is relevant for those of you that had date driven criteria for pensions or retiree health. While not the biggest impact it comes into play with annual salary reviews too - announcing early exposes you to being the one to absorb the lesser (or no) increase when a manager is figuring out how to divvy up his budget among his staff. No matter your plans it still feels shxxxy to get a lousy raise at your very last evaluation, especially if you're seeing it for multiple months thereafter.
Once I decided on retirement I did my best to prepare my staff (who I cared for) by giving them more responsibilities and freer reign on decision making. I sent them to more meetings on my behalf and generally did my best to dis-involve myself as much as possible. I wanted to do my best where my departure would not disrupt their day to day or hold their careers back in any way, and hopefully moved them forward. As to my bosses, I saw to many other instances where long term peers were walked out the door with no or little advance warning. I saw too how no matter how valuable the person may have been the company did just fine the day after without them. After all of my date driven "benefits" were achieved I gave exactly one weeks notice of my departure. I had pre-scheduled an otherwise regular communication lunch with my staff for the day I announced so I could tell them all together at once - I told my boss that morning right before lunch. If I was moving on to another company I probably would have given 2 weeks notice, but since I no longer cared about that one-sided professionalism there was absolutely no upside in giving another week of my life up that's better enjoyed away from w@rk. I'll add once I announced I was quickly dropped from decision-making/planning meetings - which was a primary component of my responsibilities. Ultimately I felt that last week was like being in high school detention - having to show up but not fully participating in the organization. Some people might revel in that "not working" but for me if it was any longer it would have been pure hell. As to saying goodbyes you don't need to say goodbye to your true work friends as they and you will make the effort to stay in contact with each other - the fake friends will quickly disappear from your life with no consequence to either of you.