The hosts were rampant at times as they stormed into a 3-0 lead courtesy of Marouane Fellaini's header just before half-time and fine Steven Pienaar and Kevin Mirallas goals after the break.
However, the visitors never gave up battling and had several chances to score before substitute Hal Robson-Kanu netted a consolation six minutes from time.
McDermott, whose side have now lost their last three Premier League games and remain one point from safety, said: "We have come to a top side. They are good quality and if we could have got that first goal, then maybe it is a different game.
"It was an uphill task. We dug in and kept going and that will be good for us in the weeks ahead. That result won't affect us next Saturday.
"The most important part of a footballer's body is the brain, and we need to make sure we are mentally right - and we will be.
"Last year we had to make up 15 or 16 points [to gain promotion]. I have just said to the players, 'Can we make up one or two?' and they said we might just do it. You never know."
The game could have had a different complexion had Adam Le Fondre's rasping 28th-minute shot not rebounded off the post with the score at 0-0.
McDermott added: "It is a bit frustrating. We had an opportunity with Adam Le Fondre's shot that smashed against the post.
"At times today, in the first half in particular, we played that game on the front foot.
"We saw them through to 40 minutes, which is unfortunate, and then they scored a worldly. Losing a goal before half-time it is never good."