Verses 6&7 shows us how we can have the peace of God. And if we did what verse 8 says, all the time, we would have good thoughts. If we looked at our circumstances today and dwelt only on them, we might never think we have any reason to rejoice. But if we look to the one who is in our circumstances with us, the one who is in control, we would indeed see things differently.
We can only do as verse 6 says....We pray, make our requests made known to God, thank Him for the answer and leave them with Him, to work out whatever way He chooses. Then, and only then, will the peace of God that passes all understanding keep our hearts and minds through Christ Jesus.
We may not feel like rejoicing all the time in the natural, but I believe we can maintain an attitude of praise in our hearts when we think about all He has done for us. Even in times of frustration and uncertainty, He is still God. And if God be for us, who can be against us?