How to render depth pass with alpha channel transparency in cycles? I have a 3D object in the empty scene. I can click on the "transparent" checkbox to make a render with a transparent background. How can I render depth (or any other) pass with transparent background the same way?

Maybe I can use the alpha channel as a mask in compositor? What is the best way to do it?
Yes, you need to use the alpha channel as a mask since transparency is not taken into consideration in the depth pass. 

This is how I have done it:

I used the node called "Set alpha".
I Plugged the depth into te "image" and the alpha pass into the "Factor"
the normalize is optional but helps to see the depth better.