Take a year off. It's ok. Maybe you'll miss it then come back. Maybe you won't. If the racing isn't making you happy, don't do it.
Or, try something else, like cross, track, mountain or gravel. You might find you like those other things more. Or maybe the competitive side of those things suits you better.
I was pretty much ready to give up racing, then I took up track. I'm having fun again. I spend a lot of time in the gym. My on-bike training is usually on my trainer or the stretch of road in front of my house. Some people would find that miserable. I don't.