How to handle unprofessional negative reviews from a journal? My problem is similar to this this and this question, but still slightly different.

I am facing the problem that my paper was rejected form a journal (with the option to resubmit to the same journal again), where two reviews were provided.

The first review was well written, constructive and shows that the main parts of the paper were read and understood. Nevertheless, the first reviewer suggests to "Review Again After Major Changes". 

The second review (who rejected the paper) on the other hand shows clearly that he neither read the paper nor the references listed in the related works section or any background material on that subject (as referenced in the paper or readily available online). Moreover, the review is filled with spelling mistakes, wrong references/citations and wrong claims. In essence, it gives the impression that it was written in a hurry without proper review of paper. But most importantly, the reviewer expects comparisons to concepts with are completely out of date and partly do not fit the discussed scenario.

I am currently preparing a resubmission to the same journal, which will most probably be handled by the same editor and reviewers. My questions is concerning the handling of the second review in the response letter in general and whether it is appropriate to contact the editor right now (few days after the receiving the rejection), shortly before or after the resubmission or not all regarding the review provided by the second reviewer.
It appears that the editor gave more weight to the first review, or at least gave you the "benefit of the doubt". Since you have the chance to re-submit, and you decided to do so, you should have to respond point-by-point to every comment that both reviewers made. Now "respond" is a deliciously diplomatic word that includes all the spectrum of reactions: from, say, "I did exactly what you asked" to, say, "go find a hole to hide and die, you stupid ignorant".  

The main advise I have to give is : keep your judgements to yourself (about which review was helpful to you, whether the one appears sloppy etc), don't differentiate between the two reviews in your response, and don't be more aggressive in your writing style when you respond to the points made by the second.

For example, Don't defend not comparing your work to concept X because "it is completely out of date". Defend your choice because, say, "concept X, valuable indeed when it first appeared in the literature, has been succeeded by etc see reference 1, reference 2, reference 3". You get the spirit. If the "outofdateness" is your opinion and the field does not agree with you,then, you have another paper in the making, one where you will try to convince the other scholars of your field that concept X is indeed outdated. 

If you do that correctly, the editor will certainly get the message (and well corroborated) about what you think of the quality of the two reviews, and why, even though nowhere in your response such an evaluation will explicitly appear.