Running a marathon is not only a physical endeavor, but also a psychological one. As your feet pound the pavement and your legs begin to ache, you've got to be able to push yourself to keep going and cross the finish line. 

That's why training for a marathon requires not only long runs, frequent workouts and a healthy eating plan but mental strength training, too. Whether you're preparing to run the GMS Queen City Marathon in September or are planning to join an event this spring, here are six helpful tips for the mental game of running a marathon:

1. Set an achievable goal 
Setting a goal can help you motivate yourself to stay on track during the marathon. Your goal can be very specific, like completing the race in a certain amount of time, or, if you're a first-time marathon runner, it can be something simpler like just finishing the race! Whatever your goal, make it realistic and achievable. Meeting humbler goals creates a sense of positive momentum that leads to greater self-confidence, whereas failing to meet unrealistic goals can put a damper on your training. 

One approach that may work for you is setting three different goals: a dream goal, a challenging goal and an acceptable goal, said running coach Mindy Solkin in an interview with the Globe and Mail. This way, you increase the likelihood that you'll walk away from the event feeling good, even if you don't meet your ultimate aim. 

runningVisualize yourself crossing the finish line.

2. Leave the baggage behind 
Running is a deeply personal sport — but try bring a lot of personal baggage and insecurity onto the pavement. Disconnect your success in the marathon from your sense of self-worth. Instead, focus on the enjoyment of running and simply doing your personal best. 

3. Take it one stride at a time 
When the going gets tough, remember that a marathon is only a series of individual steps, one in front of the other. Thinking of how many kilometres you have left can overwhelm you. Instead, think about the distance you have ahead in smaller, more easily digestible segments. If you're feeling like you can't go on, challenge yourself to run to the light post up ahead, or to the corner. Once you achieve that, set a new bite-sized goal for yourself. 

4. Visualize success 
The mind is incredibly powerful. Visualizing yourself making it another kilometre or reaching the finish line can help you adopt the frame of mind and perseverance you need to make those visions a reality. When you're training, picture yourself running the marathon with confidence and composure. Imagine how you want to feel while you run the race, and then tap into that feeling on race day if your confidence and endurance start to waver, recommends sports psychology expert Natalie Robichaud in Canadian Running magazine. If your will starts to waver during the marathon, imagine crossing the finish line and smiling and celebrating with family and friends. 

5. Keep things positive 
In a situation where your body and mind are under pressure, negative thoughts are much more likely to spiral out of control. That's why it's important to keep your thoughts as positive as possible while running a marathon, says running expert and author Duncan Larkin in his book "Run Simple: A Minimalist Approach to Fitness and Well-Being, Marathon & Beyond." 

"The key is to take all your mental effort and make it positive," he wrote. "Don't waste any mental energy on doubt, frustration and despair. Running isn't always easy, but it should always be enjoyable and rewarding."

6. Embrace rituals 
Personal rituals and routines can provide a sense of comfort and stability on race day, says Canadian Sport Psychology Association consultant Laura Farres in an interview with the Globe & Mail. Whether you take extra time to prepare a well-balanced, energizing breakfast, take a hot bath the night before, warm-up a certain way or have a playlist that pumps you up - come up with personal habits that help you be focused and calm for the race. 

Running a marathon requires both mental and physical fortitude. Follow the tips above to get your mind ready for race day and you'll cross the finish line with confidence.