Thanks to **##$ing regulations about machine-readable passports, I was recently not allowed to board a flight to the land of the free. I lost a planned holiday. Doom, gloom, despondency.
Forced to remain at home, I am now spending my days sitting in the garden watching the crocuses, primroses and daffodils spring into life in my garden - something I would have missed if I had been allowed to wander round Arizona. Contentment.
Every cloud has a silver lining.
I might also use your expression here.