Laws of attraction can be very crucial when you are trying to understand your personality and its development. Failures and successes are a part of life and should be taken in the same spirit.
The ideal thing is to take all your failures as lessons for your life. Take these incidents to understand your limitations and things that you did wrong and try not to repeat them in the future. This is how you can pave the way for your success.