My parents have this situation. It's a pain honestly, but they have the added complication of a home office in their half which makes any allocations impossible so I have to calculate and force the program every year.
Mortgage interest, property taxes, and any costs that are applicable to the whole property (insurance, repairs etc) are split between the Sch E (rental) and if applicable, Sch A (itemized deductions). Expenses specific to the rental are only deducted on Sch E. IE, repairs in the rental unit, advertising, any permits/inspections/fees you may have to pay locally because of the rental, etc.
You can also depreciate the rental, which makes selling the property more complicated. I don't know how to handle that, which is why the year that my parents sell the house they'll be paying someone to do their taxes rather than me doing them!
Keep in mind with the tax law changes that were passed and signed last December, the standard deduction was doubled, plus the SALT deduction was limited. So the chances that you'll be itemizing just went WAY down, regardless if you own or not. Which does make some things easier honestly, but you still need to do the math.
Another tax wrinkle is the passive vs active classification. Typically, I believe rentals count as passive activities, so you can't deduct losses the same way. In my parent's case, they meet whatever standard it is so they can classify it as active. Since with depreciation they usually have a loss, that actually decreases their AGI. Definitely look up that piece, because if you can get the same deal it's very nice.