You have to 1st have a shift of paradigm in your thinking. This might help. The paradigm shift you need to experience is that anything external cannot really hurt you unless you hurt your self in reaction to and external input. What hurts you happen from within.
In addition to this keep in mind the environment for sensory input in conditioned by past fabrications and our natural tendency is that we consider this positive and negative. A source of misery is this classification by our perception in the 1st place.
Let's loot at the process where you actually get hurt.
- A wanted thing has not happen
- An unwanted thing has happen
1st you recognise and perceive such thing has append. Then there is a mental reaction to such mental imprint. This causes a sensation either pleasant or unpleasant. Do cut off this experience of pleasantness or unpleasantness may be a bit far off but there is a nearer solution.
When you experience the initial sensation this brings up more memories and thoughts which compound either to intensify or reduce the intensity of the sensation. Initially you can address this issue.
How to address this is that 1st you experience a sensation you react with craving and aversion. Try your best to keep your mind equanimous. This will gradually reduce the potential proliferation with practice. Then you can look at distracting yourself from the cause. Generally it would be a good idea to look at your breath. You will see that it has become hard. Wait till it to become normal. If it is aversion do some Metta, if it is lustful imagine if body parts were separate will you still perceive the person as beautiful, etc.
To drive out ignorance which is the root cause of misery, look at the sensation closely. Where is it the most intense, when you start from a bounty of the sensation what direction, it is intense, try dividing the areas of the sensation into smaller parts and look at the smaller areas. Look at changes in it and how its looses intensity and pass away. As you practice you should try to see it as more finer and finer levels until you see this at the level or arising and passing of Kalapa. Also also try to realise how it originates, i.e., some contact of the other. Be mindful of all contacts without reaction or craving and clinging being absolutely mindful or arising and passing of phenomena within the framework of the 4 foundations of mindfulness.
At the utmost level how this happens if when you get any sense input from the environment you piece together a picture to which you react. Once you see, hear or scene something, this alone causes a mild sensation. Piecing together the picture and reacting causes a larger sensation. With practice you can cut off the second reaction.
Last but not least, you can work yourself to cut out future unpleasant experiences from within and the environment. Even experiences we call pleasant are not that satisfactory as they do not last and we cannot control them. Your environment is created by fabrication of the past. At this moment by reacting you are creating fabrication for the future. There are 2 things you have to do. 1) Drive out ignorance (glossed over before) and understand the 4 Noble Truths and Dependent Origination 2) Stop putting more fuel experience future unpleasantness. The strategy to do this is in the light of sensations:
- Pleasant sensations - this is because of past fabrication of clinging and craving. The dander is that you will cling and crave for the pleasant sensations. Be equanimous with absolutely not clinging or craving. Look at the arising and passing of the elements and Kalapas which make the sensation to dispel any possible taint of ignorance at the particular time. If you cannot see arising and passing just look at the sensation analysing is breaking it into small areas and looking at the intensity and change of the sensation and eventual passing away of it keeping in mind at what every you experience will eventually pass away. Being eqaunimous towards pleasant sensation you are not creating new fabrication or future environment to experience unsatisfactory sensation of the same type and also depleting you old stock of fabrication created by clinging. Through in the future you may experience some pleasantness this will always result in disappointment due to the 3 marks of existance (Impermanence and change, un satisfactoriness, no absolute control).
- Painful sensation - these are result of past aversion. Use this to deplete your old stock of fabrication of painful sensation hence you will not experience painful experiences in the future
- Neutral sensation - similarly for neutral sensation. Use this to deplete fabrication due to ignorance. This has some more dangers than pleasantness. There is a chance you might think you have reached the final goal when you experience neutral sensation. You have to look closely and then you still will see things are arising and passing. Also there is a danger this can bake you restless in which case best is to practice concentration. Also there is a chance you might get sloth and toper. Then it is best to practice investigation and practice which have some metal movement (like scanning the body) or mental chattering (like Metta, or in some cases chanting). These practices may make you fall back to Piti if you are experiencing Passaddhi.