Much depends upon your situation and as such this advice is kind of generic and loaded with contingencies.
If you had a healthy and secure income; and, you could gather the full 185K, I would buy it in cash. This would avoid a lot of costs with having a mortgage. However, by your numbers you are off by 47k. Sizable, but surprisingly close.
Given that you have to take a mortgage I might advise to put less down (maybe like 100K) and put 15K in a high yield savings account as an emergency fund. This would be especially true if your income is not as certain or you are a first time homeowner.
If repairs or updates are "needed", I might hold more back than the 15K previously cited from the down payment and use that money for those repairs/updates.
In general I would tend to leave the 23K in the S&P500 fund as its sale would tend to generate a largish tax bill depending upon your profit.