Normally when there is severe unbearable pain the autonomic nervous system (ANS) dominates over the body and stimulates vagus. this vagus causes sudden reduction in the blood pressure and supply to the brain leading to syncope (fainting) what is called as vasovagal syncope.
Sick stomach can cause loose stools and vomiting which can cause loss of body fluid leading to dehydration
In your scenario-
it could just dehydration/vasovagal syncope alone or can be caused by both.
Things to do-
1) drink plenty of water.
2)immobilize the injured limb and visit an orthopeadician to rule out a fracture.
3)Take antacid ( tab pantoprazole
40mg once a day in empty stomach )
4)take adequate pain killer ( tab. paracetamol
500mg twice/thrice a day ) avoid NSAIDS( diclofenac
) and tramadol for pain as both can worsen the condition of the sick stomach.
5) apply cold compression over the injured region.
6) subsequent episode of fainting occurs to visit the hospital for further management.
7) topical pain killers any gel,ointment, spray can be applied.