In order to have peace of mind, prepare yourself in advance to accept with serenity whatever occurs. People who expect everything to go the way they want are caught off balance by difficult life situations. Have an awareness that difficulties constantly arise. Being prepared in advance to accept what happens makes it much easier to cope with the vicissitudes of life.
When you feel anxiety about a future event, imagine the worst and accept it. This has a very calming effect. For example, if you are afraid you will miss a bus and feel anxiety, imagine you have already missed it and accept the consequences. If you are afraid you will be fired from your job, imagine you have already been fired and accept it.
Then "reality" can only get better!
(see Ohr Yechezkail: michtavim, p.286; Gateway to Happiness, p.75)