Parting is such sweet sorrow, but Alison Doyle writes an article about keeping the emphasis on the sweet. Keep your departure message to your colleagues short and concise, but offer assistance in smoothing out the transition. Cite specific projects and events that you shared that you will remember. Use LinkedIn to keep in contact with trusted colleagues, and use Facebook to stay in touch with the real friends you have garnered. Even in the unfortunate case that you have been laid off, it is still a good practice to inform coworkers that your time is up.
To read more, you can see Doyle’s full article here: http://jobsearch.about.com/od/resignation/a/farewelltocoworkers.htm