That sucks, sorry to hear you're looking at a loss. It sounds like you're not underwater on your loan, so short selling or foreclosing is not an option (and I would only consider that if the house is owned in a non-recourse state).
Don't have any real advice other than not to be hard on yourself or lament it too much. We've likely all had investments or assets that have gone up, and gone down. You likely got a decent deal as a buyer on your current house, potentially offsetting the losses on the home you're selling now (particularly if you moved up). For example, if you sell this house for $20,000 less than you paid for it at the market peak, but got your current house $20,000 cheaper than it would have been at the market peak, you're okay. So if you think about it that way, you didn't really lose anything, at least not assuming your current house goes up in value over the years -- you'll recover the loss through appreciation of your current house. Even if there's a loss, it will likely be a blip on your overall path to building your net worth.