The key is to learn to walk with God every day -- because the closer we get to Him, the less we'll be blown off course by circumstances or our emotions. Circumstances change; our emotions come and go, but God never changes -- and neither will our faith if we stay close to Him.
How do we walk with God every day? First, by making His Word, the Bible, a part of our lives every day. Even if it's only a few verses at first, they'll give comfort and stability to our day. You see, we need to base our lives on a solid foundation of truth -- and God has given this to us in His Word, the Bible. Read it... study it... meditate on it... hear others teach it... and let it shape your life. The Psalmist said, "Your word is a lamp to my feet and a light for my path" (Psalm 119:105).
Then make prayer part of your daily life. When problems arise -- pray. When doubts come -- pray. When people say things that hurt you -- pray. When you feel yourself getting down -- pray. When you're tempted -- pray. When you are burdened for others -- pray. And pray with joy in your heart, and with thanksgiving. The Bible says, "Pray continually" (1 Thessalonians 5:17).
Finally, have fellowship with other believers. They can encourage you and share your burdens and joys -- and you can do the same for them. The Bible says, "Let us encourage one another" (Hebrews 10:25).