The singer admitted that Perry's break-up songs helped him to write about his own experiences with a recent ex.
He told the Daily Star: "Katy is great at writing 'it's your loss' uplifting break-up songs, and I wanted to write something that good.
"I'd been going through a rubbish time with an ex, so the first single came flooding out."
The newspaper also describes McElderry's new single 'Here's What I Believe' as a "Take That-style ballad". It will be released on September 17.
The star recently announced two gigs in Newcastle and London, as well as a slot at Perez Hilton's One Night in London show on July 13 alongside Paloma Faith and Cher Lloyd.
Watch the music video for McElderry's 'Someone Wake Me Up' below: