Hello, and thank you for writing. Most mortgage lenders and programs do not require that this payment be considered in your debt-to-income calculation. This makes it easier to be approved for a larger mortgage.
Here's an article that explains how 401(k) loans work for mortgages.
You may not need to borrow from a 401(k), however, with today's many low down payment loans and other forms of down payment assistance. Many people don't realize that it's available, and does not always need to be repaid. Check out other options before borrowing from yourself.
And remember that just because the LENDER doesn't consider this payment doesn't mean that YOU should ignore it. After all, it is an obligation that could come back to bite you if you can't repay it on time -- 401(k) loans have limited terms, and after those terms expire, you will almost certainly (unless you're over 59 and 1/2 and working, or over 55 and retired) taxed on the balance and hit with a ten percent penalty as well.