Jackson Hastings opened the scoring from close range and Liam Marshall doubled Wigan’s advantage on the hour with a long-range effort.
Tries from Oliver Gildart and Brad Singleton in the final quarter wrapped up a win which saw Castleford nilled for only the second time at home in the Super League era.
Lam said: “Given the current situation we’ve been in, to come here and win – and to keep them to zero – makes this one of the highlights of the year.
“We were tough and resilient; we were back to the Wigan way and we’re in control of our own destiny now.
“I care about these players and love them so much – and I know we can do anything once we get to the play-offs.”
Lam once again spoke of his belief in his players as they dug deep to clinch a comprehensive win over a play-off rival.
He added: “It’s been a rollercoaster season, so that was a really important win and I’m very proud of the players.
“We understand the situation that we have been in and it’s easy to talk about putting things right but harder to go and do it.
“The way to win big games is to defend well and I thought we were really tough and resilient.
“It’s only us who can get us out of that hole but the results went for us today. I will reiterate that I have complete faith in this group.”
Castleford failed to sparkle in attack and could not break down a resolute Wigan rearguard.
This result ended a run of four-straight wins for the Tigers and coach Daryl Powell admitted: “I think the schedule caught up with us a bit.
“But we were so poor and pretty abject with the ball – Wigan were desperate for the win and they deserved it.
“We just need to move on from this and I think I will just throw the DVD of the game straight in the bin.
“We just made too many errors and lacked any real execution or clarity in our handling and our kicking.
“The boys are pretty beat up at the moment. Some players weren’t good enough today and they need to know that – and they will do.”