I am looking to remortgage a flat,this would put it into a loss making property, rent £400 mortgage £545,
It sounds like you're confusing profit with cash flow. The repayment element of the mortgage isn't allowable for tax. (After all, when you borrow, say, £100k from the mortgage lender in the first place, you don't treat that as £100k profit, so why would paying it back be an allowable cost?) The only bit you get tax relief on is the interest (to some extent) and the costs of arranging the mortgage. So, if the interest element of the monthly installments is, say £55, then you're still making £345 profit (before other costs).