There are plenty of dangerous mentally ill people out there who don't use any type of logic or reason as a basis for their decision-making.
Mental illness isn’t the only explanation. When people are indoctrinated into stupidity and no longer believe in truth or reality, it’s possible to convince them to both believe “I support police / military” while attacking police officers (several of the worst offenders of Jan 6).
Perceived desperation is a better explainer than some generic mental illness.