Move into your second home such that it qualifies as your main residence, then sell it with no CGT to pay, and go and live where you are now, paying off the mortgage with the house sale proceeds.
that is the way to do it
not many do.... because the second home is usually inferior
and I can tell you it is a real pain
eveything has to be moved
and you have to do it - bodily move
and it is one think the taxman wont accept " a deem"
I deem myself to be living there ( but I am not)