For me, getting through a marathon is always a matter of segmenting the race into little chunks.
I always get excited at 13 (halfway) and anticipate 17. In the latter stages of the races, my self-talk goes like this, "17 Miles! Single digits!" (Meaning I now only have 9/8/7/6/5/4/3/2/1 miles to go from this point -- single digit miles to go.)
After 17, I start thinking, "Only three miles to 20 -- and from 20 there's only a 10K to go!"
At 20, I think, "In three more miles, I've basically only got a 5K -- a 5K! Anyone can do that!" then I start anticipating 23.
At 23, we're inside MGM and it's almost time to begin the chant that another runner taught me long ago, "Sidewalk, Boardwalk, EPCOT, and we're done." (Except it becomes a little rhythm exercise, "Side-walk, Board-walk, EP-Cot, and we're DONE" -- over and over in my mind.) Sometimes I say it aloud to someone who seems to be struggling. It really reminds me of how close we are to the finish and that medal.
At 24, you can taste the finish. The first step past that mile marker, I say "Less than two miles to go" (even though technically I know I have the .2 to go). And it's the same for the 25 mile marker -- one step past and (in my head, if not in actual inches) it's LESS THAN A MILE! A mile!!! And everyone is cheering and you KNOW nothing is going to stop you from finishing at this point.
My dad used to say when I struggled with anything, "Wendy, you can stand on your head for 3 weeks" -- meaning that you can tolerate anything if you know you only have to tolerate it for a short while. THAT is the name of the marathon mental game, as far as I'm concerned -- breaking the last few miles into short tolerable chunks and putting them behind you.
You're going to do great!