You're letting the INCLINE win the mind game. Don't do that.

Use that area to work on technique. Focus on pedaling in circles, keeping the cadence high, all that. Tell yourself that you are training and traning is supposed to tire you out. (True.)

Or you could concentrate on the scenery on the side of the trail.

Or you could find another route...