There are a lot of people who distrust or dislike - maybe even outright hate - the police and what law enforcement represents to them. Most would never dream of actually trying to hurt you; their disdain for law enforcement stops short of wishing harm on another. Of course, there are a smaller number who might actually wish harm on you, or feel that if a cop is hurt or killed it was a deserved fate. Still, they would be unlikely to preemptively act out their contempt. They are still sheep, even if angry sheep! Stay wary of such sheep, for even the most docile may bite or kick if panicked or backed into a corner. Then there is the far fewer, but considerably more dangerous, individuals who would lash out and attack a cop without hesitation.
Unfortunately, when you are dealing with an unknown subject for the first there is really no sure way to know into which category they fall. Unless you are supernaturally perceptive, those who love and respect you for the work you do look an awful lot like the haters. Do this job long enough and you will come to know a number of rough-looking, tatted up pussycats that hold you in the highest regard, and also some well-coifed, but hair-triggered, soccer mom types who will throw down at the slightest provocation. Profiling whackos is an inexact science!
Stay vigilant. Remember that past encounters are not always reliable indicators of future behavior, and unknown variables can push folks past the edge of sanity with little warning. Have a plan (and at least of couple backup options for when the first plan goes awry) to overcome any threat or attack. Remember the most important thing you do each workday is go home at the end of it.
Do not fall victim to the unharnessed fear borne of paranoia. The kind of fear that may keep you alive but hinder how you live, that paralyzes good actions for worry about what might happen but fuels overreaction when it actually does, and that widens the chasm between citizen and cop.
Be pragmatic without being cynical
The pragmatic cop knows to never underestimate even the simplest traffic stop, for a deadly assault can come from the most unlikely people and for the slightest reason. The cynical cop knows everyone, on every stop, is just looking for the perfect opening to attack!
Okay, perhaps a bit of hyperbole there, but you get the point. A little bit of skeptical cynicism comes with time on the job, and is important for personal and professional survival. Too much cynicism, and of the kind that fosters universal distrust of nearly everyone you meet who is not a fellow cop (and at least 2/3 of those who are), may be very dangerous itself in terms of psychological and even long-term physical harm to an individual.
Excessive cynicism can easily lead down a path where the officer dons blinders that allow focus to fall only on evil, chicanery, and human stupidity. In time the officers who take this path begin to see virtually all people as either inherently dangerous or beyond redemption. The pragmatic cop, however, is able to see the dichotomy that is in all persons and law enforcement's role serving and protecting this often frustrating public, and do it with healthy good humor.
Maintain a healthy perspective
While never forgetting there are some people who hate you, remember that the overwhelming majority do not.
In 2006, I was in the funeral procession of an Illinois State Police Sergeant who was not only a fellow officer, but an old friend and fraternity brother. He had been killed in a traffic crash and was being laid to rest in the city he had lived and worked most of his life. As we drove to the cemetery I was overwhelmed by the countless people who came out to stand in a frigid rain to pay their own respects. An all-age, multiethnic crowd lined the route. Several held flags, others held their hand over their hearts or saluted, and many were clearly shedding tears. As our procession made its way cars traveling the opposite direction pulled to a stop on the shoulder of the road and many drivers got out of their cars and, like so many others, stood in the rain to pay respect.
Since then, I have lost two friends from my own department suddenly to heart disease. The public response was one of heartfelt sympathy and sharing in our loss, and testaments to their character - even from some whom they had once arrested.