How on earth does someone get in that predicament? Preventative maintenance. Prepare and be aware. Good luck to you. The IRS is no joke.
There are awesome people everywhere, especially here. It's kinda too bad there isn't a for sale section here, because there are likely forum members who would have bought your guitar and held it for you until you could afford to buy it back. I would do that if I had the spare cash, but I tend to spend it rather than have it in reserve.
I also had to move a guitar in 2012 due to unexpected major expenses, so I know it hurts. Just keep on keepin' on. It'll get better. It's only stuff.