The key thing is that Thomas reminds Will of himself as a younger man. Will has moved on, but Thomas is, despite being the same age, effectively a pre-season one Riker, a very different person. We all become different as we age and our priorities change, and that's really the theme of the episode. Will remembers
"being" Thomas, but has grown out of some of Thomas's more foolish character traits. So seeing them all up-front rankles him a bit.
The situation with Deanna is a prime example. Will never got over her, he always felt it had been a mistake to leave her and that if he'd had the maturity he does now back then he'd never have done it. Thomas lacks that maturity. Deanna is kind of flattered by Thomas because he reminds her of the Will Riker of old, but Will himself knows
instinctively that his "younger self" is only going to run off and leave her again. And he can't bear to be reminded of that fact, especially the possibility it could break Deanna's heart.