Quick edit: Obviously the perfect answer is to just look at what camera and focal length is being reported in the EXIF data of an image. The difficulty only arises if that was stripped away!
As the others have said, if you want to get the distance just from the face that's a pretty hard task to solve 'manually'. If you can also use other knowledge about the scene, like the height and distances of objects in the background, you might work it out though.
For images alone, the answer was already mentioned as well: Computers are the way to go. Here's one solution that appears to be both competent and reasonable to set up:
New version: https://github.com/sicxu/Deep3DFaceRecon_pytorch
GitHub - microsoft/Deep3DFaceReconstruction: Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set (CVPRW 2019)Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set (CVPRW 2019) - GitHub - microsoft/Deep3DFaceReconstruction: Accurate 3D Face Reconstruction with Weak...github.com
This doesn't really give you the subject distance rather than do the first step of your job for you. But given the 3D model of the face, you can of course use an image and a 3D viewer and move its camera around until the image from the 3d viewer matches the real one. Giving you the subject distance and also the focal length.
Here's a very effective look at how focal length affects the shape of a face.
@Joules is pointing you in the right direction. You might glean some insights for your questions from facial recognition field by searching for "facial recognition focal length". Camera Distance from Face Images might be a good place to start.