We get asked about these issues a lot by landlord clients who have or are considering property companies - in summary:
If the company is a property dealer - i.e. it just buys and sells properties, possibly doing some refurbishment or development along the way, then it is trading and the profits realised are trading income. Mortgage interest (and any other kind of interest for that matter, including overdraft interest) is an allowable expense against the trading income. It is important that you present the business in that way when filing the tax return.
If the company is a property investor - i.e. it buys properties to rent out, but then sells one at a profit, the gain is a capital gain. The mortgage interest can be offset against the rental income but it is not deductible against the capital gain.
And always use a good accountant. We can put you in touch if you need help.