A short sale is when the bank agrees to take less than the current balance due. This route will not affect your credit and is a good way to maintain good credit. I have a friend who got the bank to agree to a short sale which took $100k off of this balance and enable him to sale his home.
A deed in lieu on the other hand is treated as a foreclosure and will seriously damage your credit. You can rebuild it afterwardsa and by doing the deed in lieu, it just helps thing move along faster so you can start rebuilding your credit. I wrote a few artitles on free ways to rebuild recredit at
http://www.irvinemortgage.org