Scorsese called this film “moral ground zero”. It was so draining for him that in order to get away from the whole experience, went to hang out with The Rolling Stones (as one does) and made Shine a Light.
This is a very dark story that deals with identity and morality with some drops of existentialism. His Catholic background is at full force here. Boston was at the epicenter of the sex abuse scandal just a couple of years before the film “In this archdiocese, God don’t run the bingo” Costello says to the priests. It’s the perfect scenario for this story, which describes a world without direction.
“Who’s good? Who’s bad? Who can I trust?” As the story advances, it all becomes very draining. Costigan who wanted to escape his family reputation and be good, is forced to go to even lower depths for the sake of battling evil. Just because you’re on the “good side” doesn’t mean the road to Heaven will be any easier. His first session with Madolyn is all about this. He’s suffering and even begs Queenan to do something about Costello immediately. He’s looking at the world from a moral point of view and he can barely stand it. Meanwhile, despite coming from the criminal underworld, Sullivan lives in a fancy apartment and just waits to leak any information Costello could need to continue with his operations; which ends up bringing chaos to the station. He’s a two faced son of a bitch who (sometimes literally) operates in the shadows. He doesn’t even allow other people to be themselves around him. Look how he reacts when Madolyn brings a photo of herself to his apartment; and then compare it to how Costigan appreciates the same image in another scene.
But nobody understands this whole situation better than Costello. The thing about evil is not that is opposed to “good” out of principle; it just looks for its own interests. “I don’t want to be a product of my environment; I want my environment to be a product of me”, he says at the very beginning.
He’s willing to screw anybody in order to keep his position. Of course somebody like him would work for the FBI every once in a while. So this is now a world in which heroes can’t be 100% heroes and villains are not 100% villains. Sullivan looks just as lost as Costigan when he finds out about this and not even taking Costello down seems to resolve anything for him. I believe he genuinely would have let everything die off once the mission was over and he would’ve continue with his aspirations for the State House. But again, Costigan’s sense of morality can’t let injustice pass by, especially after Queenan’s murder. In the end Sullivan gets his comeuppance, but by looking at Dignam’s attire, I’d say, outside the “laws of men”.
Almost all of the main characters are dead by the end and that leaves the audience with a heavy feeling, but I believe there are a few glimmers of hope. First: Queenan. When he offers Costigan food at his home is such a little but tender moment that’s unlike anything else in the film.
He's the only one that truly cares about him and even ends up sacrificing his own life to keep him safe as he promised. A good Catholic who represents the old values and even becomes a martyr for the greater good. The other one would be Costigan’s ending. Continuing with the Catholic themes, he stuck to his values and eventually got his identity back. You can say there was justice for him, just not in this life. I guess there’s also Sullivan’s impotence as a metaphor for how evil can’t create, only destroy. On a sidenote, I love how Marty, shows a few seconds of John Ford's The Informer; another very Catholic film.
I think Infernal Affairs is a fine film but regardless of which one do you prefer, they have a lot of differences between them (the themes, the locations, and the visual style) so they can coexist. As it is, I consider The Departed one of the best remakes ever.