Well that is Positive Thinking that you see a positive aspect in everything. We want situations to be favorable to us always! and when situations are not favorable 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 unfavorable 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 unfavorable 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.