I do a similar thing when I travel to Australia. I have UK and Aust passports. I leave the UK as an Australian, and show that passport at the stopover. Then once I leave Aust (local border force want to see the passport you entered with) I revert to the uk passport for the return.