WARNING!
If you didn't read Harry Potter and the Deathly Hallows, do not read this post unless you want spoilers.
Harry does die in the Deathly Hallows, even if temporarily. Voldemort casts an Avada Kedavra on Harry, which also causes the part of Voldemort's soul hidden in Harry's lightning scar (the one he's got on the front, Voldemort accidentally made it an horcruxe when he slaughtered Harry Parent's seventeen years before) to die.
Harry dies and finds himself in some sort of space between Earth and Heaven where he has a talk with Dumbledore. He then comes back to life and plays dead up until his final duel with Voldemort.
After that, if you mean that Harry dies and does not come back to life... Well, that pretty sucks in my opinion and that would enrage some of the fans (Harry's death was expected by some before the seventh book was finally published) and would make the other sad to see their hero die before 18.
However, it would also depend on how Harry dies... If he dies but successfully gets rid of Voldemort, though it is sad, it could make a great final (although not as great at the actual ending in my opinion).
Nevertheless, I think Harry's death would probably affect the sells of the books. Killing the main character is generally not a good idea to make a good book in my opinion, unless the character has some sort of epic death but has successfully saved the world and made it a better place.