The thing I think David had to contend with was not whether it was good or bad, but the impetus with which it was conducted. His wife hated Ted before any of this. You can almost see the rage in her eyes about him when you watch documentaries on the subject. She led him in every way in getting Ted tossed away (and I think knowing this victory for her would come at the cost of her husband)-- David would have left it in his subconscious and Ted would have been found later (probably after more victims) in some other way.
David had to contend with the fact that you did the right thing because your hateful wife nudged you to do it, and that intent seemed to be more like 'how do we get rid of Ted' than 'lets save people'. AFAIK he is still married, so this is the key bit left out of these articles that David can't write our say out loud and you just have to read it between the lines.
I don't know that there were any good solutions for him. Probably the only way that wouldn't have felt like betrayal would have been for him to go up to Montana and deal with the problem himself, man to man, without the bit of giving him up to the FBI behind his back. Whether the prison time from that would have been worse than living with a lifetime of guilt, I have no idea, a difficult decision no doubt.