Just like soldiers who have been in battle and seen a lot, sometimes too much, police work does take a psychological toll on officers. Many become alcoholics, get divorced or kill themselves. Suicide is especially common after they retire because they don't have the job anymore to keep them going. Cops often become isolated and don't have many friends outside the department. People often don't understand how dangerous police work is and so they see a video or news report and complain about how the cops did not have to shoot that guy or beat that guy. The cops become bitter because their friends don't understand the cops did what they were trained to do, shooting the gun out of someone's hand is Hollywood, not real life.
So yes there is often a "police mentality" and it comes after years of frustration and pain. It's a form of PSTD but is generally unrecognized, just like the military cops are too proud, too manly to admit a problem. I am lucky I only do it part time in a city that is not too busy, and I have always had a good wife who supports me and a faith in God that everything works out in the end. They often adopt an us vs them mentality. Just like old soldiers they are the best friends to have and often the worst enemies to make. ER doctors and nurses often get that way too. They see too much bad. They used to call it job burnout; that's what the SGT Says.