Racing with Type 2

I'm just starting to do some races & I'd love some advice. I normally ride around 25 miles but I've done 4 rides this year over 50. I rode a40K road race in the Missouri Senior Olympics last weekend (I'm 57) & did fine the first half, struggled the second half, then ran out of gas about 3 miles from he finish.
I've been concerned about using Gu & other things of that sort & wonder what others use, how they space them during a race, & any other pointers for a Type 2 who takes no meds, has a good A1c, & apparently needs to up his game.

I'm not doing any racing on the bike (I do compete in rowing) but I do like longer rides, am about your age, and I know the problem. I've been experimenting with ways to both add a bit more carbs/glucose before the ride, and then take in some during, in order to keep up stamina. My rule-of-thimb is keep the inputs moderate and spread out, to avoid sharp spikes.

In the Tour De Cure this month I carried one bottle filled with Accelerade mixed at about 2/3 normal concentration, and another of plain water. I used up the glucose water in the first 60% of the ride. I had a good ride and think it might have helped. No fade that I could detect. I've also tried using some of the gels that are designed for "slow energy" (rather than the "quick" stuff) and I'm less sure that they really help.

As always with type 2 and exercise, YMMV, and its a matter of experimentation.