To the OP’s point, sometimes buying the ‘wrong’ bike can be a bad thing. I haven’t come close to quitting, but may know where he’s coming from.
I’ve found that going to bigger/less engaging bikes damps my enthusiasm a bit. Long-travel 29ers and 6in 26in bikes whose capabilities that I’ll never live up to make climbing less fun and descending a bit numb. I don’t think it’s just me- the bigger friends’ bikes get, the less they seem to ride over time.
It may not be as crazy as it sounds at first blush. I’ve sold off a few bikes that didn’t excite me and just ride the bike that’s best suited to my tastes and local trails. In any case, trying a bike that you’re excited about (be it 26in, 650b, singlespeed, or ‘other’) may well be worth a shot if you’ve been riding that long…