Don't respond right away. Resist the temptation to snap back. There is no use in getting angry or creating a nasty paper trail. Take time to cool off and then reply cordially.
Determine if you're overreacting. Ask yourself whether the comment was really that bad. Sometimes a thoughtful offer to help can seem like an insult.
Forgive, but remember. Don't hold a grudge, but keep in mind that if you are ever asked for a reference about the person, you can give a frank answer.