After a few years of this I finally bit the bullet and went on a 10-day meditation retreat. ~12 hours a day of meditating, no books or talking or exercise. The first days were tough, all that boredom and irritation was still there and I had to sit with it for many, many hours. But I felt like I'd made a big commitment in going there, so I sat it out. The solidarity of a couple dozen other students going through the same thing helped a lot too, even if we weren't supposed to acknowledge each other's existence.
On the third or fourth day a switch kind of flipped in my brain and it was no longer hard to sit perfectly still for an hour.
At that point I guess I had learned the basic skill of meditating, and it's stuck with me. As long as I'm somewhere reasonably quiet and distraction-free I can get back into that state within a few minutes.
Also, as a side note, some of the Buddhist philosophy was also helpful. I originally perceived mental illness as similar to physical disease: people are generally healthy, and sometimes there's something wrong with you that needs to be treated and corrected, usually by a doctor of some kind. In Buddhism the script is flipped: existence is suffering by default, and most people require some kind of deliberate work to come to terms with their own existence. I get that it won't resonate with everyone, but in my case it helped a lot to view what I was going through as a manifestation of ordinary human suffering rather than some special, unusually intractable mental health condition.
EDIT: Also, shit gets intense when you keep ratcheting up your concentration and introspection. Getting past the boredom and being able to sit still for an hour is just a first step.