For extraction face region, just move from RGB to YCbCr color space, Then giving some thresholding value to the Cr component you can extract face portion. This becomes a thresholded image, just a BW image. Now you need to subtract from the original RGB image.
Apart from colour-based extraction method that is already mentioned above, I'd like to suggest the following method as an alternative as it provides detailed description.
Have a look at this brilliant paper published in CVPR 2014 (Kazemi et al. - attached).
The code is available as a part of dlib v18.10 (link attached).
This doesn't provide the exact output as you want but I am sure you can build on the output of this system to get the desired results.
A standard elliptical mask can be applied over the face image to remove all unnecessary parts of the face image except the central face region. The elliptical mask has been formed using centre of the image, and radius has been chosen in such a way that it could include only the face part. The face part will remain unchanged, but the outside of it remains black.