I think, "No, I don't" is a perfectly fine response!
I guess I don't find it as obnoxious as you do, but I am not sure how you could "stop this before (you) need to handle it" because there usually isn't much of a lead-in to a comment like this.
I think that if it's a stranger, just saying, "Thanks," and turning away is fine (even if you're not actually grateful). If it's a friend, I think you can say, "What? That's like me saying you look like (random celebrity, perhaps of a different gender/race/age, so it's absurd)."
"Morticia, you look just like Morticia Addams today!"
"That's not very nice, or accurate."
"Excuse me, did you know that you look just like Christopher Walken?"
"Excuse me, but my mother said that if I have nothing nice to say, I shouldn't say anything at all."
"Hey lady, you look like Joan Rivers."
"And like Joan Rivers, you should probably keep your opinions to yourself."
"Excuse me, did you know you look like Snooki?"
"Wow, that's a real stretch." (and walk away)
(Picking random celebrities here, no need to tell me you find them attractive, folks.)