The IRS considers this a second home because it is not your primary residence. If this was a rental, the loss may be deductible. If the house sat empty waiting to be sold, the loss is not deductible. Gains are taxable on personal property.
Personal-use property: Generally, property held for personal use is a capital asset. Gain from a sale or exchange of that property is a capital gain. Loss from the sale or exchange of that property is not deductible. You can deduct a loss relating to personal-use property only if it results from a casualty or theft.
Investment property. Investment property (such as stocks and bonds) is a capital asset, and a gain or loss from its sale or exchange is a capital gain or loss.
Per IRS Publication 544, chapter 4, Reporting Gains and Losses: Loss from the sale or exchange of property held for personal use is not deductible. But if you had a loss from the sale or exchange of real estate held for personal use for which you received a Form 1099-S, report the transaction on Form 8949 and Schedule D, as applicable, even though the loss is not deductible.