Near the end of The Departed, we find out that Dr. Madolyn Madden was informed that Sullivan was Costello's mole inside the MSP. She confronted Sullivan about it and gave him the silent treatment during Costigan's funeral which should have given Sullivan a red flag. It's only a matter of time before Madolyn tells someone about everything she knew. Why didn't Sullivan kill Madolyn for simply knowing that information? He even killed Costello once he admitted to being the FBI's informant. What's stopping him from doing the same to some shrink?
He didn't kill her because she was carrying his baby (or possibly not).
Of course, that could all change after her shunning him at the funeral, but he doesn't have time to kill her, because he himself gets killed when he gets home.