How to render only a mist pass
I guess you could enable the mist pass, and in the compositor, Ctrl+Shift+LMB to view the mist pass and you'll get the viewer node. Press N to open the side panel and in the Item tab there is an option to save that as an image. [the viewer node has to be selected in the last step].