Being a nerdly engineer… I’d do a cost benefit analysis…
Short sale – if you have a non-recourse loan and the bank agrees… Less ding to the credit.
Foreclosure – bigger hit to the credit score longterm.
If you thought for sure you might be coming back to the area in the future – it might be worth hanging on to it and renting it out (covering the difference between rent/owning…) But only if the condo meets your needs long term. Since you only planned to hold into it for 5 years… it probably doesn’t.
My advice – take a full look at the benefits and consequences of each choice… then determine what you are most comfortable with.