Like many have already said, mushrooms have this mind-fucking quality that other psychedelics, i.e. LSD and mescaline, just don't have. Everyone is different, but I know that's been my experience. 3.5 grams is getting into breakthrough territory, IMO, so that could be your problem right there. You might have been right on the verge of breakthrough but your ego wasn't having it and when you start to fight it like that it's easy to have a bad trip. In my experience, once you've achieved ego death, it's harder to have a bad trip than when you're on a lighter dose and are still relatively coherent. It still happens, but the more your conscious mind is still able to interfere with the trip, the more likely it is to swirl out of control.
I've had one experience similar to the one you describe. I believe it was also an 1/8 ounce dose of dried cubensis. I took it early in the morning expecting to go for a walk, but I ended up lying in the fetal position on the floor for 4 hours with really dark visuals and not much else. I was used to those kinds of doses though. I think the first time I ever did mushrooms I took an eighth. I've been upwards of a quarter ounce and when you let go finally it can be an incredible experience. Not that I recommend going that high. And if you do, definitely work your way up.
My best advice to you if you ever plan to do it again would be to start small and do your best to kind of let go and lean into the trip. Just go where it takes you when you start to feel uncomfortable. Don't try to fight it or stop it, just go with it. You'll likely find that whatever you were afraid of or fighting is usually nothing. And if it is something real in your life that your mind just won't let you address when you're tripping, all I can say is that you're going to have to address it sooner or later, sober or otherwise. Oftentimes people find that psychedelics were the only things that allowed them to face their issues head on. That's what I'm considering right now. After a long break from psychedelics I'm hoping that some experiences might help me to address my own addiction. I had a few gnarly bad trips at the end of my consistent psychedelic use and stopped for over 4 years before I did them again. I've dabbled here and there since then, mostly with DMT, but my active addiction to heroin has kept me from any notable experimentation. I look forward to going back to those places I was so fond of once though.