Being animated in adverse circumstances is a bit difficult, but understanding God's purposes for our lives is the key to managing discouragement and changing it to joy and joy because nothing is chance and God allows certain circumstances so that we can develop spiritually and grow.
1 Peter 1: 6-9 says:
In this you rejoice greatly, although now for a moment you have had to suffer pain in all kinds of trials. These have >come so that their faith - of greater value than gold, which perishes even if refined by fire - can be proven genuine and >may result in praise, glory and honor when Jesus Christ is revealed. Even if you have not seen it, you love it; and >although you do not see it now, you believe in it and you are filled with an ineffable and glorious joy, because you are >receiving the goal of your faith, the salvation of your souls.
It is not about being hypocritical and showing happiness while we suffer, it is that, even in the midst of pain and suffering in various trials, we can register because we know that God has control of all things and that those who love God all it is good, it is about believing in the Lord's promises that our end will be good and not evil and that even when we are in the midst of the worst afflictions we know that God allows this in our lives to be promoted to a new level , to get away from sin.
A very clear example is when a woman is in the midst of labor pains, although she is suffering a lot of pain, she also feels immense joy because she will know her baby soon after having her so long in her womb.
There are many keys that the apostles teach us to feel joy and rejoicing in the midst of bad circumstances, if we really love God, we will be relieved as we pass through the fiery furnace of fire, and one of those keys is to be grateful to Jesus for giving us the salvation and the coming glory that awaits us, we know that the pain is temporary just like everything in this world, but the things of God are eternal and last forever. The second key where we can find rejoicing is that we are born again and are joint-heirs with Christ, this means that Jesus shares with us the glory of heaven, therefore, what is of the Son is also ours.
Focus on eternity and not only on earthly things, you should know that what happens on earth is momentary and fleeting, while those of heaven will be eternal and full of joy, thinking in this way shortens and relieves your affliction. Fix your eyes on a vision, on fulfilling the purpose of God to which you were called, if you still do not know it, you can start with the basic ordinances that every good Christian who loves Jesus would do while God on the road shows you your true purpose , you could start talking about Jesus to the lost, helping the needy according to your ability and most importantly and first of all have a relationship and communion with God, in this way you will constantly receive the guidance of God and will console you in the midst of affliction .
We must understand that many times God sends trials to get us away from sin and lead us to obedience, just as a Father does with his children.
2 Corinthians 12: 7 says:
7 And lest the greatness of the revelations should exalt me exceedingly, there was given to me a thorn in my flesh, a >messenger of Satan to buffet me, lest I should be exalted above measure;
8 concerning which three times I have prayed to the Lord, to take it away from me.
9 And he said to me, My grace is sufficient for you; because my power is perfected in weakness. Therefore, I will gladly >glory more in my weaknesses, so that the power of Christ may rest on me.
10 Therefore, out of love for Christ I rejoice in weaknesses, in insults, in needs, in persecutions, in distresses; because >when I am weak, then I am strong.
Regardless if the trials or challenges come because of sin or to shape your character, I want you to know that God is disciplining you because he loves you and wants the best for you, I encourage you to trust Him fully, his thoughts are higher than ours and he wants good for us, the sadness that comes from God is for life, while the sadness that the world brings is for death and destruction, trust in Him and He will do.
May God bless you and pray to the Father so that this seed may be sown in the best soil of your heart and bountiful fruits upwards and deep roots downwards.