Carlos Mendes: “You’ve got to learn your lesson from this one.” (Photo courtesy of the Lancers)

NEW YORK — Needless to say, the Cosmos’ elimination from the Lamar Hunt U.S. Open Cup was a disappointing experience.

But head coach Carlos Mendes hopes that the loss will be a learning experience as it looks to bounce back with a pair of National Premier Soccer League road matches this weekend.

The Cosmos started out slowly in the opening half hour against Hartford Athletic on Tuesday night, fell behind by two goals, then dominated the rest of the match in what turned into a 2-1 defeat at Al-Marzook Field in Hartford, Conn.

“The guys worked hard. they battled, they fought,” Mendes said. “When you come up short, it’s never easy. The way we played, especially in the second half, we gave enough to possibly tie the game and try to take it from there.

“We’re disappointed, knocked out. We wanted to have a good run in the Open Cup. The game can be cruel sometimes. Now the only thing to do is look forward and grow from this, take the positive and then learn from our mistakes early on and then go from there.”

New York had dug itself a two-goal hole by the 25th minute. Mendes called both scores “soft goals.”

“The first 25 minutes we were sleeping and then we woke up and took over the game,” he added. “Two goals like that, two bad goals, it’s not easy.

“After the first 25 minutes we kind of fell into a rhythm. We started playing. We said at halftime that if we continue to do the last 15 minutes of the half and play with confidence and start trying to break down the lines and get forward more, we’re going to find success. We came out with the right mentality and attitude and it was a very strong hand. We had some very good opportunities.”

The highlight of the match was Bledi Bardic’s 35-yard blast into the upper right corner in the 57th minute, which sliced the Hartford lead in half.

Mendes called it an “unbelievable goal.”

“You’re not going to see too many goals better than that, so I’m very happy for him,” he added.

Helped by seven minutes of stoppage time at the end of the game, the Cosmos pounded away at the Hartford net, but could not find the equalizer. That’s not to say the Cosmos came close. Captain Danny Szetela rammed one shot from atop the box off the crossbar in the 68th minute.

“It could have gone in,” Mendes said. “That’s how it goes.

“We said afterwards that if we grow from this and play the way we did in the last 65 minutes of the game, we’ll be a tough team, a successful team. You’ve got to learn your lesson about this one.”

The Cosmos won’t have long to wait to turn those lessons into reality. They returned home for two days of training at Mitchel Athletic Complex in Uniondale, N.Y. before they hit the road and head to New England again.

They visit the Greater Lowell Rough Diamonds in Lowell, Mass., on Friday at 8 p.m. before coming back to Hartford to meet Hartford City in a 4 p.m. Sunday encounter.

New York will host FC St. Pauli in an international friendly at Rocco B. Commisso Soccer Stadium in New York City on Thursday, May 23, at 7:30 p.m.

The Cosmos’ next NPSL match will be at home against Hartford City at Mitchel Athletic Complex in Uniondale on Saturday, June 1 at 8 p.m.