You should expect that the foreclosure will appear on your credit report despite the prior discharge. There are cases upholding the listing of a post-discharge foreclosure action as an accurate entry on the credit report. The foreclosure serves a different purpose than collection of the debt - it allows the lender to gain title to the collateral.

The benefit of a deed in lieu of foreclosure is that it conveys the property back to the lender without foreclosure. A short sale involves the lender agreeing to allow the property to be sold for less than the amount of the loan; if the lender agrees to that but intimates that it would want to hold you responsible for the difference you can remind the lender of the discharge. If the bank senses that your "short sale" is an inside deal with your spouse I would expect them to withdraw their consent to the sale - they want to maximize their return, not give you an incentive to do a poor job marketing the house so you can get it for less than you owe.