The concept that "whatever happens is for the best" should be used with care. If misused, it could cause harm.
Only use the concept after the fact. When you are able to take action to rectify a situation, take that action. Do not rationalize laziness by saying that "whatever happens is for the best," and hence you are free from your responsibility to take action.
The Baal Shem Tov admonished someone who misused this concept: "It's a good thing you didn't live during the period when Haman made his decree to destroy the Jewish people. You would have said it was for the good."
Of course, there was benefit from Haman's decree. It brought the people of that generation to great spiritual realizations. But it takes wisdom to discern the true good in every situation.
Be careful not to allow negative things to happen because of carelessness, procrastination, or desire for comfort, and then justify your inaction by saying what is happening is for the good. Only when nothing can be done should you accept it for the best.
(Rabbi Pliskin's Gateway to Happiness, p.243)