For me it was purely mental.
I've always loved disc golf, but my attitude held me back. When my mentality and motivation was about competing/winning/(substitute similar words) I got seriously burnt out exactly as you did. I made a thread about it too. Not to mention all of the other nasty side effects. A similar mentality/motivation(whatever you wanna call) it in my life also brought countless problems. I've always been what I consider "overly competitive" with a "bad attitude" for pretty much my whole life. I decided it felt wrong and I wanted to change and had to get my ego in check. I had to accept that I was a bad disc golfer (by my standards). I had to embrace my flawed nature (big picture) and (small picture) my flawed ability to throw with high precision. Once I accepted that I was going to make tonnns of errors every round I will ever play and not always be "on" and shooting hot all the time my averages and my success improved. People told me they noticed improvement and a better attitude.
My best mentality is to play only for the love of the game. I've found that my love of the game is more than enough to motivate myself to throw great rounds. I now seemingly never feel frustration, anger, disappointment, anxiety, or grow bored of disc golf or even just a disc golf round. I never give up during a round or half-ass a shot because I love throwing every shot. I love playing disc golf. I always have but my self got in the way. The score and others things I used to value feel insignificant. I have more fun and far less mental errors and struggles than most disc golfers I play with, even players that usually shoot better than me. I have far lesser swings hole to hole, round to round, and month to month than many players.
If you relate try playing one round with your club or whatever where before every single shot you remind yourself that you play only because you love playing disc golf regardless of the course or if it's raining or how tired you are or how good you are or whether you lose. Because you want to play and you don't care about who beats you. It may work for you too.