Learning more about the nature of God has made a huge difference in the way I deal with mishaps, and even with more serious accidents. The knowledge that God is totally good and that He is always in control gives me the conviction to pray if an accident occurs.
There's a statement in Science and Health that has also given me a lot of strength in these situations: "When an accident happens, you think or exclaim, 'I am hurt! Your thought is more powerful than your words, more powerful than the accident itself, to make the injury real.
"Now reverse the process. Declare that you are not hurt and understand the reason why, and you will find the ensuing good effects to be in exact proportion to your disbelief in physics, and your fidelity to divine metaphysics, confidence in God as All, which the Scriptures declare Him to be." Science and Health, p. 397.