I am sorry for your situation.
Extensions are normally extensions of time to file, not extensions of time to pay. If you owe tax, you still have to pay the tax due on April 17th (this year) - the 6 month extension gives you up to 6 months to send your paperwork in.
I don't know what state you are in, but my guess is that it is unlikely that they will refund your payment. However, the only way you can find out is to call the correct number at the state's DOR and ask. Do a search for "[your state] department of revenue "What if I can't pay my tax?" " (yes, include the inner but not the outer double quotes)
If you do this for the IRS, you will get this URL to an IRS webpage. But, of course, you will have to search for your particular state.