For a year or so when I was in my twenties, I taught "job readiness skills" to "at-risk" youth. (As with most government jobs, I didn't accomplish much, other than "earning" a salary.)
I do remember reading at that time that most work problems arise out of difficulties with co-workers, whether they be above one or below or at par on the organizational chart. The articles argued that this is as least as much the case with white collar work as it is with physical work. My own experience is that it is worse among the coat and tie set: pointless p---- contests, cringeworthy suckup campaigns, watercooler character assassination: we've all seen it. I did tree work for about eight years. Blowups in that sort of work come and go in a matter of minutes: a lot of swearing, maybe a shove or two, and it's over. We all wish, particularly in an office setting, that our direct job skills, intelligence or diligence might trump such nonsense, but too often it does not. Too often, the interpersonal c---p calls the tune.
Here are a few thoughts:
1) Maybe it's just not the sort of work for you, or attracts the sort of people you'll struggle to work with. If that's the case, leave, taking care to do so in such a way that you can score at least passable references. I tried a number of things before I found a line of work I actually enjoyed - teaching English and Philosophy. Most days I actually enjoyed heading off to work. For a while when I was younger I worked as a technical writer. I worked at the General Electric Company subcontracted to write overhaul and repair manuals for the Navy. I enjoyed the work itself, but the red tape and the fools who loved it were unendurable. I went back to tree work. Simple: cut stuff down and grind it up.
2) Maybe at its base your depression (a real and terrible malady, I know) has nothing to do with the job. If that's the case, or might be, get into therapy. It really does work if you find the right therapist.
3) Consider apologizing if you determine you've been in the wrong. It happens. It has certainly happened to me. At times a genuine, uncringing and forthright apology can work wonders.
I've been in similar straits in my life: I think most people have. There is always some sort of light at the end of such tunnels. I genuinely hope you find yours.