The envelope's contents are never definitively explained in the film. However, it seems logical to assume it contains either evidence or at least an explanation of the truth - that Leo DiCaprio (i.e. Costigan) is the real good guy and Matt Damon (i.e. Sullivan) is the real bad guy.
Earlier in the film, Sullivan's girlfriend Madolyn finds out the truth about Sullivan through a CD - but that wasn't meant for her, but rather to show Sullivan that evidence existed against him. It's possible that this same evidence was given by Costigan to Madolyn (possibly with even more evidence/detail to be used in the event of Costigan's death).
In fact, given how the film ends, it's not too much of a stretch to believe that Wahlberg (i.e. Dignam) was either given a copy of the same evidence by Costigan or was given the evidence directly by Sullivan's (now ex) girlfriend Madolyn, which gave him the final "push" required to kill him.