This is a really paranoid take on the world. In the first place, I have never experienced a mob turning on me. Yes, it has happened to some people, but my impression is that this is a rare occurrence. In the second place, I have never been victimized by a police officer. I've gotten two tickets in my life and I've had a few other interactions, but I've never gotten a bad impression of police officers.
I don't deny that there are police officers who abuse their authority. I agree that our police forces are too militaristic in their approach. I have seen many videos of outright murder on the part of police officers. But I try to evaluate the evidence rationally. There are 800,000 police officers in this country; we don't see 800,000 police atrocities daily, or monthly, yearly or even decadely.
The fact is that every civilization in history has had some kind of police force, and we definitely need one. If we abolish the police, your gun won't protect you against the gangs.
Moreover, police in America face a special challenge in that so much of the citizenry is armed. I don't blame them for taking extreme caution when dealing with a citizen who might be armed. The police in the UK are unarmed, because the citizens are unarmed. They have far fewer killings than we do.
Your belief that guns will protect you is unsupported by objective evidence. Yes, I've seen the stuff put out by the NRA "proving" beyond any doubt that guns save lives. I don't believe it, because there are too many contradictory statistics. Perhaps the most powerful bit of evidence is the fact that the CDC is forbidden by law to research the health impact of guns. If guns were so very healthy, why would gun advocates want to hide the research?