The booking would get cancelled when you no show for the LON-MAD sector.
Does the ticket allow you to break the journey ?
Don't forget U.K. Departure tax is high ( and would not be payable if originating in MAD)
So I would look at breaking the journey in London, then flying on to MAD for a few days before coming back. Have you tried using the ITA matrix tool?