The next time you have an exceptionally bad day, remember that focusing on the good, letting God’s love into your life, and fasting to have a better attitude can give you the power to change your perspective! You don’t have to endure in hopelessness, waiting for the next misfortune that lurks around the corner.
As Elder Jeffrey R. Holland of the Quorum of the Twelve Apostles has taught: “Your best chance for being happy is to do the things that happy people do. Live the way happy people live. Walk the path that happy people walk. If you do, your chance to find joy in unexpected moments, to find peace in unexpected places, to find the help of angels when you didn’t even know they knew you existed, improves exponentially.
Faith Sutherlin Blackhurst, "3 Ways to Cope with a Crummy Day"
Faith mentions 3 specific ways to help guide your focus when life doesn't go that well. One, is to write down how God's hand was evident during your day. Do this every day. It's not enough to think about how He helped, we need to write down at least 3 blessings that day.
Two, ask God precisely what He thinks of you. He is the only one that matters. So ask Him. If the answer doesn't come right away, keep asking.
Three, fast to change your attitude to be happy despite the challenges and bad stuff that happen.

Doing these 3 things will change your outlook on life for the better. Optimism will permeate your behavior and thoughts.