A lot of weightlifting revolves around the physical components and visual results. This seems obvious, since it's physically demanding and causes strength to increase, muscles to grow, and your central nervous system to adapt to the discomfort. After lifting for 10+ years, I've noticed that there are a lot of mental benefits and challenges that come along with the physical strain. This is by no means an exhaustive list, nor is it very cohesive, but it's more a collection of things that I've noticed as it relates to what I think about while lifting.
The Weight Still Feels Heavy
It's refreshing to look back in your training logs and see that your one-rep max from when you first started is now part of your warm-up weight. I distinctly remember failing at 185lbs on my bench press and honestly wondering if I'll ever be able to bench anything worthwhile, because it just felt so heavy. Now that 185lbs is my third warm-up set, I still think it's heavy.
I've been asked if it feels "easy" to lift certain weights. Sure, it's not nearly as daunting now that my max bench press is 320lbs, but when I get under 185lbs and unrack it, it still feels heavy. There are weights that I unrack and just think "this is too heavy, I don't know if I can do this". Knowing that I've done that weight before (or more), I do the lift anyway, and sometimes I'm surprised that my body did it. If I listened to my mind, I wouldn't lift nearly as much, because the weight still feels heavy. I have this mental battle in every working set I do. The weight doesn't feel that much lighter, you're just able to do more.
I have a theory that if a lifter did not know how much they were lifting, they'd be able to push themselves further. For this to work, you'd need a coach who knew when to push things, and to load the bar appropriately. I think this relates to the point above, but it also relates to crossing certain milestones. Deadlifting 400lbs seems insane, even if 395lbs went smoothly. For me, it's these round numbers that cause my brain to think it can't be done. The change in the hundreds digit just locks up my mind and I start heavily doubting myself. I've heard that for other lifters who mostly use 45lb plates, it's the multiples of 90lbs over the bar (so 135lbs, 225lbs, 315lbs, etc) that cause mental blocks. Since I use whatever weights are available in my home gym, this isn't as much of a deal to me.
Part of the reason I calculate estimated one-rep maxes is that I can reassure myself that I can lift a certain weight. I often tell myself that if my spreadsheets say I can do it, then I can do it, so stop worrying about it. You'd be surprised at how often this tricks my brain into shutting up!
Doing It Anyway
I generally enjoy weightlifting, but there are days that I just don't feel like it. Sometimes it's my diabetes acting up, sometimes I'm tired, and sometimes I just want to sit on the couch and eat junk food. Making lifting a non-negotiable part of my week has been extremely useful in building mental fortitude and discipline. Some of the days where I don't want to do it but I do it anyway are my best days, so I never regret working out.
I should note that this took me literal years of stopping and starting and skipping and being inconsistent before I found a groove for myself. I think this is natural, at least for me, so I try not to beat myself up over it. Now that I'm more consistent, I find that I can shift lifting days around or even add a rest week without completely derailing myself like I used to. This discipline-building has started to spill over into other aspects of my life, but I'm still trying to reproduce that habit-forming aspect with less time in the "inconsistency zone".
Executing the Plan
As alluded to in other points above, if I listened to my body, then I'd never make any progress. I attribute my recent progress to making a plan, then executing it. The key for this for me has been to make the plan while I'm not lifting, as I'm more likely to be rational rather than emotional. That said, the accessory portion of my workout is very fluid based on how I'm feeling that day, so it gives me the opportunity to only do my main sets if I need to. Having some rigid sets and reps for my main lifts while being flexible with my accessories is one of the reasons I've stuck with 5/3/1 variations for so long. I have less decisions to make while the weight feels heavy, so I get my work in and execute the plan.