United set up a last-eight away tie with either Inverness or Stranraer thanks to Nadir Ciftci's header after Kenny McLean's penalty had been cancelled out Ryan Gauld's opener.
McNamara said: "We're very happy to be into the quarter-final. I thought there were some good bits about our play.
"The intensity was there as you could see with the way we started the game and closed them down well.
"We lost the penalty not long after we had scored which was disappointing but we had a few chances to score going into half-time. We're delighted to get the second goal through Nadir.
"It was maybe a wee mental thing there with the way results have gone in recent weeks. Six or seven of the boys who started today were 21 or under."
McNamara is expecting Inverness to come through their fifth round replay against Stranraer having drawn 2-2 at Stair Park on Saturday.
"Obviously Stranraer and Inverness have still got to play but you would imagine that Inverness will come through that at home to Stranraer," he said.
"The experience they're getting right now will stand them in good stead. It will be a very hard quarter-final against Inverness who will be favourites.
"Like every manager, you're wanting a home draw but it's not to be.
"We went up there in League Cup quarter-final earlier in the season but hopefully we don't get the same decisions."
St Mirren boss Danny Lennon added: "I didn't think there was a great deal between the teams as the scoreline suggests.
"To be honest, I thought it clicked more for Dundee United in the final third than it did for us.
"They were the brighter side at the start and at the beginning of the second-half as well. Those were the two periods which seemed to cause us the most problems.
"That was disappointing from our point of view. There were s few players out there who didn't reach the levels which they know they can.
Eric Djemba-Djemba made his debut for the club and lasted 70 minutes and Lennon was satisfied with his contribution.
"I was happy with Eric's performance. I thought the first 20 minutes he was trying to find his feet," he added.
"But you can see the experience and the knowledge which he brings. He's got lovely soft feet."