You can avoid this by using "soft particles". That entails reading in the depth buffer in your particle pixel shader, and modulating the alpha output of the fragment based on the distance of the point to the geometry in the depth buffer. If you do a search online for soft particles, you can find loads of examples if you need more information.

In D3D9, you can't use (normal) depth buffers as textures (readable), only as surfaces (writable).

One workaround is to use MRT during your normal rendering, and manually write depth to a second render target. This however, requires editing all our shaders, and is inefficient.

Another workaround (that I'd recommend) is to create an "INTZ" texutre. This texture is a readable depth texture, and you can get its surface in order to use it as your depth/stencil target (instead of your regular depth buffer).
The only downside to this approach is that creating an INTZ texture will fail on any GPU older than a GeForce 8, so it raises your minimum requirements.

I don't think you can just grab depth in D3D9. I could be wrong but I think that's a feature that came in with D3D10. You will need to use a shader to render the depth to a floating point render target and then pass that to the particle shader.

In D3D9, you can't use (normal) depth buffers as textures (readable), only as surfaces (writable).

One workaround is to use MRT during your normal rendering, and manually write depth to a second render target. This however, requires editing all our shaders, and is inefficient.

Another workaround (that I'd recommend) is to create an "INTZ" texutre. This texture is a readable depth texture, and you can get its surface in order to use it as your depth/stencil target (instead of your regular depth buffer).
The only downside to this approach is that creating an INTZ texture will fail on any GPU older than a GeForce 8, so it raises your minimum requirements.

If I remember correctly from back then, you can use RawZ on older NV gpus.

There are no code samples because this is extremely dependent on your engine.

Hodgman mentioned the valid point that writing depth to a special texture other than the main depth surface (which normally cannot be read) requires all shaders be modified to write that information, which really will be quite a nuisance when you have a ton of basic shaders that all have to be hand-written.

My engine’s shader system works on permutations based on macros within a single shader, so for me to add this tactic (which is what I did) is nothing.

If you want to do something similar it will really take a huge amount of work and you have to really focus your shader system on a macro-based system. Macros help with permutations, obviously. But implementing your own system really takes a lot of work, and getting to the point where you can use macros may require a whole rewrite of your shader system.