Trying to get depth-information in Workbench
Im afraid it's not possible without modifications. As  stated in the manual, the workbench purpose is to provide a fast visual output for animators.

The Workbench Engine is a render engine optimized for fast rendering during modeling and animation preview. It is not intended to be a render engine that will render final images for a project. Its primary task is to display a scene in the 3D Viewport when it is being worked on.

The only options you have is to use the regular viewport color, metallic and roughness value or any of the display methods to show random, object or vertex color . Since those can not be filled with a map (to be used with a view dependent gradient to simulate a z-pass) you have not much options.
The only rough approximation possible, would be to use vertex paint, paint the distance into a gradient and render this in workbench, with vertex paint mode on.
But that is dependent on mesh density and also not dynamic.
You can however define a render in cycles or eevee, without any lights or shaders evaluated and just render the depth, this should be very fast, and deliver the result you are looking for !