I worked successfully at my job for 4 years, 3 of them remotely. I was the sole developer on staff so I had no backup. My boss and our clients seemed very happy with my work, and in fact our client base began expanding a little too fast. Unfortunately, I had a very tough year for personal reasons, and I began missing deadlines and making mistakes. The last straw was when a parent was diagnosed with a terminal illness.
Realizing I couldn't handle it, I recently gave notice and have been helping transition my replacement. As a result, all the embarrassing shortcuts and sloppy work I did over the past year (meaning to clean up "later") are being revealed.
I'm strongly tempted to explain why my work was so lousy-- for instance, I found I had been walking around and working with pneumonia and three broken ribs, which were almost healed by the time I got an X-ray. On the other hand, everybody is busy at work and I am sure no one wants to hear my sob stories. If I had been in the office, it would have been easier to see that I was moving heaven and earth to get the job done.
The issue is that I hope to work again in a couple of years, when my dad's cancer resolves, and my youngest child goes to kindergarten, and of course I would like a good recommendation at that time. I haven't heard a word of criticism from my boss, though I sense that he is less than pleased lately. Should I explain all, and if so, when and how?
--answer to Monica's question in comments: no, nobody else in the office knows. When we communicate, there's no chitchat, just work-related emails.
EDIT: You are all right, I should have alerted my boss to the issues as soon as they happened, but at the time I kept thinking things would get better soon. For example, I thought I had a bad cold in February, but I didn't expect to still be sick in April. I thought that having two babysitters (a regular and a backup) was good enough; didn't expect that both would become unavailable all summer.
Operating without any backup at work and without enough backup at home, I was not able to recover from any bad luck, big or small. So although I have been a hardworking, honest, and smart employee, it was a flaw that I didn't ask for help soon enough or forcefully enough... and in the end, the result was probably the same as if I had been lazy but better at delegating (though I suppose the company/clients saved money on hiring extra personnel.)
Well, maybe I can bring this up when I really leave for good in a few weeks, and say that next time I find myself struggling, I will ask right away for help.