The mental game is much easier to discuss in person 1:1 than on a forum. One problem is that it's such an expansive topic that thousands of books have been written on the subject. To dive deeply on a forum just isn't easy. An even bigger problem is that everyone is in a different spot and needs different things. Might as well ask "How do you play pool?" You can drill down to more specific challenges such as "I struggle when playing better players" or something, but even this isn't so easy.
The reason the mental game is difficult is that it is a game of balancing what seem to be contradictory ideas. While dead stroke is in the same place for all of us, directions there are different depending on where we are out of balance. For example:
Win means more to you than anything ------------ Detached from results
Practicing to the point the game comes easy ------------ Be prepared for adversity and vulnerability
Play with confidence ------------------- Have no expectations
Don't let pressure make you rush ------------------ Don't let pressure make you overanalyze
These aren't perfectly stated, again the mental game is tricky and this is off the cuff. But the point is that what might help one person might hurt another. So Scott Lee's advice of looking to the fundamentals is very good advice for most people. You want a solid physical game that takes pressure off your mental game because you build a reliable foundation and confidence. But for players that are timid and trying to perfect their game in their basement so they don't have to risk failure and loss, this might be the wrong direction.
In sum, dead stroke is perfect balance, when we're not in dead stroke it's because we're out of balance and which way to adjust depends on which way we're starting to tip over. On a forum we can minimize the importance of the mental game or throw around cliches, but I haven't seen much discussion that has really lead to a lot of breakthroughs.
I would recommend reading books on the subject or working with a sports psychologist. Best of all is to talk with good tournament players. We can see on youtube how the top players shoot or play patterns. You don't get to see what they think. And books are one sided and not customized. When you go to a tournament with a good player you can spend time with them to hear how they think about the game, how they prepare for matches, how they process losses, etc. You can voice your doubts or fears or struggles and they can tell you how they work through those thoughts and feelings. To me this is the best way to go.
This is assuming you believe in the study and practice approach. I know the majority believe it's better just to shoot balls in the hole and not overthink it. If that works for them, great. If you're not getting the results you want, do something different. To me the ultimate test are the results on the table. Theories are great. The proof is in the pudding.