Cook County State’s Attorney Kim Foxx recently attempted to deflect criticism of her handling of the Jussie Smollett case by insinuating that her critics were motivated by racism. In an anonymous letter published on the website CWB Chicago, a Chicago prosecutor speaks out against Foxx and her demoralizing attacks on her own law enforcers.

The State’s Attorney’s Office in Chicago is an international laughingstock, as politicians, ­comedians, scholars, legal pundits and regular citizens blast its handling of the case against Jussie Smollett. The criticism is pointed squarely at Kim Foxx, the first African-American woman elected to serve as Cook County state’s attorney.

In the wake of this criticism, Ms. Foxx recently claimed she can’t run an office “driven by anger and public sentiment.” She added that the “goal posts change” when an African-American takes the position of chief prosecutor, insinuating that the critique of her handling of the Smollett case is motivated by racial animus.

This, while various activists stood on the same stage and ­described the Chicago Police Department as the “blue klux klan” and the Fraternal Order of Police as a sworn enemy of black people. Foxx refused to speak out against these salacious remarks.

Also notable, the people who criticized her handling of Smollett weren’t all white. In fact, many of them were African-American. It isn’t about race; it’s about basic legal ethics.

I have been an assistant state’s attorney for 15 years. And I am white. During that time, I have spent countless hours trying to make right the endemic violence on the south and west sides of Chicago. The majority of the victims in these cases have been black, as have the majority of charged offenders.

I have sat and cried with mothers of murder victims, their young sons and daughters gunned down by members of their own race because they were at the wrong place at the wrong time. These mothers never called me racist.

I have consoled witnesses to unspeakable acts. I have visited people’s homes, talked to grandmas and aunts and heard from them that they need help, ­because the boys and girls in their families couldn’t leave the house without fear of being shot or having to shoot someone.

I often get to work at 7:30 in the morning and don’t leave ­until 8:00 at night. We don’t get overtime. That means I don’t get to see my daughter before she goes to sleep. I often have to come in on weekends to complete discovery or study for a jury trial. This means no activities or quiet time with my daughter or my husband.

I am not unique, nor do I mean to laud my hard work. In fact, I probably work less than many of my colleagues. But you know who works even harder? Police officers. By far.

Police officers are white, black, Asian, Hispanic, Eastern European, you name it. They don’t segregate themselves by race or community. They work together every single day to try and prevent anarchy in communities where gun violence, drug use and abuse of women are everyday occurrences.

They are the first ones on scene when there is a bleeding baby lying shot in the street or when a mother sobs over her dead teenage child’s body.

Think about that — think about the hours of trauma they absorb, surrounding themselves with pain and tragedy. They work inhuman hours. The officers with whom I work answer questions about work 24/7.

They never stop.

They have families they don’t see, birthdays they miss, baseball games and dance recitals they can’t make it to because they are working up a case. They suffer from PTSD, obesity, alcohol abuse and depression because of what they see on a daily basis. These men and women of all races are literally killing themselves to protect the community.

Yes, there have been corrupt cops in Chicago history — just there have been corrupt priests, teachers and politicos. Fact is, the majority of police officers work this merciless job out of devotion to keeping people safe and making right the bad acts of criminals.

Mrs. Foxx: When you demean law enforcers, you not only strip them of their dignity, you also contribute to the violence in the city. Because young African-American boys and girls who hear the head prosecutor call ­police racist act accordingly. They commit acts of violence against innocent officers. They enact street justice when people are killed and lock their doors when police come to talk about murders in their neighborhoods.

Unchecked and untrue criticism of the police destroys communities. It doesn’t build them up. And blaming the Smollett fallout on race? That is just ignorant and self-serving.