Where a mortgagee of a right of occupancy under section 3 proposed to foreclose his mortgage, or otherwise enforce his lion on the land subject to the right, the provisions of the last foregoing section shall, so far they can be made applicable, apply as if the mortgagee were the tenant. ...