Livi finished a point behind Raith Rovers in Group D, but their eight-point tally saw them finish ahead of Stirling and Forfar on goal difference in the race for one of three places in the second round for second-placed teams.
Former Livi striker Liam Buchanan gave Cowdenbeath an early lead at the Tony Macaroni Arena, but the hosts were ahead by half-time.
Jason Todd put through his own goal after a 21st-minute corner before Bruce Anderson fired home in the 38th minute after a brilliant ball from Jack Fitzwater.
Craig Sibbald curled in a glorious third eight minutes into the second period.
Martindale told LFC Live: "It feels a wee bit hollow if I'm honest. But going into today's game, would I have taken qualification? One hundred per cent.
"We controlled the majority of the game. I was really disappointed with the first goal, but I'm going in with a back four that has never played together.
"But it was a convincing win, we played some really nice football at times and on another day we are probably hitting them for five or six.
"I could see what we did in Spain come to fruition, the patterns of play. There's a lot of boys in the building who haven't been Livingston players, so we are trying to get our work ethos and style of play into them. We need these boys to step up as quickly as possible."
The win came at a cost as Livi lost Jackson Longridge and Andrew Shinnie to first-half injuries.