The key is to be open and transparent about what you did. One major reason that companies are rationally worried about resume gaps is that gaps could mean anything - for all they know you were running a criminal enterprise or locked up in a mental institution. It could also mean that you couldn't find a job for other reasons that may no longer be documented - there are things that wouldn't show up in your background search after a period of time for instance. Continuous employment history isn't desirable because it's important that you were always working, but because it is verifiable in a way that rules out certain possibilities. Other than explaining your situation in a transparent way that soothes these fears, if you worked for or with others on some projects during this time, you could offer them as extra references.