There are at least two ways to look at every challenge you will face in life. It’s not about the right or wrong way at looking at a difficulty but rather a useful way and useless way.
If seeking the bad in everything just makes your life worse and keeps you unhappy, then it’s an ineffective way to think. Sometimes it’s good to be pessimistic to prevent further pain in which case it would be more useful than being optimistic.
The majority of the time, aiming to find the good in a bad situation will be a much more effective way to improve your situation and you can always find an upside to every setback if you look hard enough.