In the conversation in the car between Doe, Somerset and Mills we see that Doe justifies the murders of all the people he killed according to the seven sins. But how can he justify killing Tracy?
He don't (justify it). He killed her because he was envious of David and his life. Envy was his own sin.
Doe: Because I envy your normal life, it seems envy is my sin.
Which made him the six sinner (a representative of the 6th sin). Then Mills will become the seventh sinner when he kills Doe.
Doe: Become vengeance, David, Become wrath.
That's why Somerset while warning Mills not to kill Doe said
If you kill him, he'll win.
Unlike his other kills, Tracy was not a Sinner that was killed but was a target as a consequence of envy. A sin that Doe himself committed. So basically she died without having been a sinner.
His plan was to reveal this to David so that upon knowing the fact, David would kill Doe for the Sin of Envy and become Wrath himself. Except unlike the other 6 sins that paid for the sins with Life, David's punishment would be to lose his wife.
Tracy died without having sinned but when you look at it as a whole, she died in advance for David's wrath. A sort of Catch22 if you ask me.