As the others mentioned, you should contact a tax professional regarding tax advice.
Feel free to contact me if you have any real estate related questions about the home selling process. I would be happy to provide you with a professional estimate of your current home value at no cost or obligation.
As others have stated, you need to consult a tax professional. That said, the gain or loss (which is how the tax is calucated) on the sale is difference between what you paid for the proeprty less what you sold it for (net of expenses). The cost basis might be adjusted for any major improvements. If it is a rental property, there may be depreciation recapture. It is not a simple answer which is why you should consult a tax professonal.
Reach out to all of those who answer your question here and chose the one you like the best and work with them. generally speaking the bank will pay for the commission of a listing agent so you will have no out of pocket and you will pay no income taxes on the debt forgiveness income if it falls within certain parameters.
You are good, don;t be desperate, just take the appropriate steps to get to where you want to go, and chose the best to help you along the way.
You will be fine...