one simple tip to avoid these kind of thinking:
1. meditate and have faith in God.
dont wory about past, live in present and plan for future. these experience are to make u learn the lessons of life.
just take them in +ve way and keep smiling.
God is always with u.