"What's wrong with the defocus node? It allows to do exactly what you're trying to do.My problem is that depending on the amount of focus, I get these strange results when the camera moves...causing objects to come in focus. If I have a very shallow DoF it looks really strange. I am not sure what my problem would be called...I may have to post a video explaning it.
Another approach is to map the z-buffer using a "map values" node, then using the output as the input value for a simple blur node. That isn't so accurate and have some problems with image boudaries but it's really fast."
I conversed with someone who has helped me a lot with Blender 3D, and who is also an avid After Effects user. I think he said to go with the Z-Buffer and blur with After Effects (works better than the greyscale supposedly), but I am going to have to clarify that with him.