There are a lot of good comments here.
First things first, the obvious depression/anxiety. I'm gonna guess it has been happening for some time now at a low level. You mentioned being criticized for being "too nice", which is one of those weird low-level depression/anxiety markers. It was tolerable then, and suddenly you have all this stuff happening. You didn't do anything to make things "go wrong", nor did you lose intelligence. It is just that your brain has gone a bit wonky right now. The brain is an organ, a body part, and body parts sometimes have glitches and you are seeing the symptoms.
But it is ok because there is stuff that helps it get back on track so that you can be you again. It is just really getting urgent right now. If it were your leg, heart, gallbladder, or pancreas (diabetes), you'd be at the doctor or ER right now or at least have an appointment with your doctor.
And that is exactly what you need to do. The first step is the hardest. You can take folks this letter so you don't have to explain it. You can go to the local ER, your regular doctor, urgent care, or a psychiatrist. Call the suicide hotline and they'll get you in touch with folks. You can have someone else drive you or make the appointment if you'd like, after telling them or showing them this post. You can email them this if you can't seem to do it in person.
The likely outcome of this is that you'll get some medication, which will help get your mind in a better state to start doing things with these problems and make it so they aren't consuming your mind in the same way. You might wind up in the hospital for a short time - this is generally a safety measure or being in the hospital after a severe injury. You may or may not get some time off work. There might be some therapy. This is more for some help working through all this so that you are better off in the future - much like you get phsycial therapy after an injury.
After this stuff, taking care of the rest of the issues will be much easier. Dealing with work, changing jobs, and those dark thoughts. It may be that you change jobs and things like that, but you can deal with that stuff one at a time once you get your brain in a place that it isn't sabotaging your view of the world.