Is it possible for buyer to pay seller with his personal cash before
mortgage paper work is finished and then ask lender to give mortgage
proceeds to him?
Don't ask us. Ask the lender. You need to how they will handle this. This could delay things if they need to do any other work.
If yes, would that have to happen before or after closing?
Closing is where the buyer gives the money to the seller. Plus a lot of paperwork is signed. So you would have to make all these arrangements prior to closing.
The seller would want to know about this. They will be getting a cashiers check from you instead of your lender.
Make sure that you are protected with Title insurance. This is normally a requirement of the lender, but you need that protection.
If you go this route then you will have another closing for mortgage, just like a refinance.
If after closing, then would that loan qualify as regular mortgage or
would it have to be HELOC or something else? (My understanding is that
regular mortgages have better tax deduction rules than HELOC)
The mortgage from the bank may be considered a refinance. Make sure you still qualify for the loan you want. For example if they were giving a you a special rate for being a first time home buyer, or a low down payment loan.
The question is how does the IRS see it. In Publication 936 (2020), Home Mortgage Interest Deduction
Mortgage treated as used to buy, build, or substantially improve home.
A mortgage secured by a qualified home may be treated as home
acquisition debt, even if you don't actually use the proceeds to buy,
build, or substantially improve the home. This applies in the
You buy your home within 90 days before or after the date you take out the mortgage. The home acquisition debt is limited to the home's
cost, plus the cost of any substantial improvements within the limit
described below in (2) or (3). (See Example 1, later.)
You build or substantially improve your home and take out the mortgage before the work is completed. The home acquisition debt is
limited to the amount of the expenses incurred within 24 months before
the date of the mortgage.
You build or substantially improve your home and take out the mortgage within 90 days after the work is completed. The home
acquisition debt is limited to the amount of the expenses incurred
within the period beginning 24 months before the work is completed and
ending on the date of the mortgage. (See Example 2, later.)
You will have to close the mortgage within 90 days of the purchase date of the home.