Well that is Positive Thinking that you see a positive aspect in everything. We want situations to be favourable to us always! and when situations are not favourable then our natural reactions are like as you said we start getting panic.
However if we bring this piece of knowledge in mind at that time that an unfavourable situation is an opportunity to rise higher.
Swami Vivekananda said "Life is a continuously unfoldment of a being under circumstances tending to press it downwards". So whenever there is an unfavourable situation if we look on it as an opportunity, as a stepping stone then we can see it as a grace of God and that is the secret of seeing situations as graces of God.