Generally, one would assume that "tiny specks of life" don't allow the victim to have complex and coherent fantasies; the brain not only shuts down for good pretty easily, but also starts slacking early on in the process. So Picard's vitality probably played no role in what transpired, and Q took care of everything in the "afterlife"; Picard may have been happily alive, teetering on the edge, or completely dead during the proceedings, and we simply can't tell.
Did Q have something to do with Picard dying in the first place? Perhaps not in the sense of actively putting him in harm's way on Lenara - but more like noticing that Picard was seriously wounded in the line of duty, and stepping in, pushing Picard past the edge, and having fun with the corpse for a while. Crusher doesn't exactly act as if Picard's death would have been inevitable or his recovery a miracle... So if Picard really was dead for a while, Q may have been a necessary extra ingredient there.
There's also the possibility that there was no Q, and that Picard just had a funny dream. After all, this would be the only Q episode without the capital Q in the title...