You can take 6 measures to become mentally strong

Yoga and Meditation This can make you strong mentally. Try for at least 20 mins daily and then gradually increase the time.

Good diet: Always keep a good diet. This will also make you mentally strong

Time Management: Learn to manage your time well.

Positivity: Always keep going and try to stay positive.

Spend time with close ones: Keep talking to friends and families, share things and spend some time with them.

Keep Going: Don’t stop yourself in bad times, work on new plans.