Practice your marathon day thinking in training - what do you think on long runs, tough runs, at challenging times? What are you thinking when you have a good run. Then imagine running and thinking like this when you are doing your marathon (or other events).
Also, what is your goal for the event, is it achievable based on your prep? What do you need to do to maximise your chance of achieving it?
Visualisation or imagery is very helpful. You can use it to think of what you want to happen, how you want to be running and thinking. Then, think of specific challenges that might arise and how you will want to manage, minimise and move on from these. Imagine in detail. Then, imagine how good it will feel to finish, knowing that you went out there, tested yourself and did your best.
Think of all the long runs that have been fine. Why won't this week's be the same? Imagine how good you'll feel once you have completed it. What is challenging about them? Can you make them a bit more fun, varied, where you switch-off mentally, daydream, think of how good a practice each one is for the big day...?
Keeping an honest food diary might help your food decision-making too!