You can also get “letting relief” on the period in which the property was let.
What has been said about interest is correct, you are better off borrowing against the rental property as interest is deductable (although only upto the value of the property when first let)
The CGT relief is principle private residence relief. Effectively you time apportion the period of ownership and pay tax on the period which relates to letting. As stated above, the last 3 years count as being owned (currently) so are free from tax.
Mefty’s calculation is correct on periods taxable.
There are a few other “quirks” for example if you were to move back in, this deems any period (upto 3 years) of non absence as occupation, so again increases the period of occupation.
If you have multiple properties, there are two plans of action, you can either elect for one property to count as your principle private residence (main home effectively) or it can be based on fact. Obviously if one property is let, then you only have one left to occupy, but it may be worth electing to avoid any doubt.
I’m a tax advisor by profession, so apologies if I’ve got a bit too carried away!