In order to reslove a mortgage problem via a deed in lieu of foreclosure, you need to obtain the cooperation of your lender. They normally require that you provide them with all details of your finances, employment etc( they want to see if you have any resources from which they can insist that ou keep paying). It is also necessary that there be clear title. meaning no other mortgages, judgments or liens.
Credit scoring is a proprietary process, the exact details of what effects any events have are kept secret.