It would typically be one title and one loan. In any case, if you’re going to stay in one unit, the whole building would be considered owner occupied for loan purposes. That should help you with low down payment requirements.
I wasn't clear with your example. If you are saying that your credit situation won't allow you to borrow more than 400k, then it doesn't matter that you split into two loans. 62.5k down in your example would still require you to get 437.5k in loans and that is more than 400k. You'll be better off seeking one mortgage with the lowest down payment for your owner occupied situation. Also consider FHA. If you qualify, you can get one mortgage for the duplex ( or up to a 4 unit property) with just 3.5% down.
@Taylor Corder Buying multifamily units as a primary residence ( up to 4 units) you can buy with lower down payment. If you do not own any property you can buy with 5% down payment under Home Possible. 3.50% down payment with FHA.