I think we can take away a couple of lessons from this that could really change our personal lives, at the very least:
First off, when things are going good, don't forget to thank HaShem for giving us a break.
Secondly, and this one is the big one: If we look at the pattern, it's obvious that God wants our devotion, our prayers and our mitzwoth. (רחמנא לבא בעי) The suffering that He puts us through is only a means to an end. If we really want to send HaShem a clear message that we want Him to bless us and make us successful in all of our endeavours, then we need to pray hardest and work hardest at our Torah learning and mitzwah observance when things are going their best. We need to send a clear signal that we aren't taking a single moment of this blessing (that HaShem is sending us) for granted.
Your life is good? You're happy? Shout it out, dance, sing His praises. Thank Him profusely for everything that ever was and ever will be in your life, good AND bad.
Sometimes He will try and test you, if things start to get difficult pray harder, louder, be happier. Know that He is only testing you.
When you don't have the energy to pray, when you're empty. Take the time, work up the strength, think about what it is you really want, Who it is you're praying to. Remember that everything else that seems so important in your life actually stems from HaShem, and all of it is due to what His Will desires for you.
Draw a line in the sand, HaShem, I want good things, and I will pray all the harder and work all the harder with everything you give me.
Let's just be careful and guard against the one stumbling block in this plan: We have to always remember that our prayer, our avodah, our mitzwoth, our Torah, is not dependent on our current predicament, it is in spite of our predicament. It is predicated on nothing. We'll do our part and relax in the utter confidence of pure and simple emunah (faith) that He will do His, and so much more.
Just remember: When it gets good, make sure what we are giving back outshines whatever we've given until now. Make the message clear.