I'm looking for idiom(s) which depicts 'someone is desperately searching for something good out of obvious disaster'
Something like, someone is trying hard to justify something evil.
Solution 1:
I think “grasping at straws” could work well here, it means
trying to find some way to succeed when nothing you choose is likely to work
and
trying to find a reason to feel hopeful in a bad situation:
While neither of these quite captures “desperately” from you question, it depends on where you get the explanation from as dictionary.com does actually use desperate in theirs:
Make a desperate attempt at saving oneself