Stand fast therefore in the liberty by which Christ has made us free, and do not be entangled again with a yoke of bondage. – Galatians 5:1
Your hope should be in the qualities of God’s righteousness; the greatest being His love of you. All that is needed is to claim the victory handed to you by the great love of Christ Jesus.
It may take some time, some work, and lots of patience but just like the song Broken and Beautiful by Mark Schultz, you can maintain the joy if you never give up and practice your faith. If you continue to grab the upper hand of God and enthusiastically express your appreciation for the freedom He gives you.