First of all please believe the pain is REAL. not saying you arent, but just making sure.
in my dd who has been having stomach pains since she could express herself - its related to anxiety.
at 2 i went back to work and then later lost my car in an accident and was living a crazy life of leaving house at 7 am and getting home at 8 pm with dd in dc for 12 hours or so. at 3 1/2 i quit. her stomach aches began when i lost my car which means commute became horrendous. the day i quit my job my dd's stomach pain went away. just like magic. never to return in that same manner - every day. i'd done everything for her pain but it did nothing.
that's when i realised --- aaah anxiety. in hindsight. i felt terrible i hadnt figured it out.
i am actually quite grateful for stomach pains. they tell me how dd is doing as she prefers to put on a happy face sometimes so as to not concern us. her dad falls for that all the time. i didnt like that at K she was all nice and cheerful (i could tell). so i asked her if her stomach hurt. and then i asked her again if K was fun.... whole different story.
as she grew older i think by 6 they were really really reduced. BUT even now if i am stressed or not giving her enough attention (meaning not direct attention but not calming down) she can get stomach aches.
so look around at ur surroundings. if you change something around you and ur dd's stomach pains go away like magic then its probably anxiety.
dd had high anxiety when younger. at 5 i could see her tense up if i lost my way or if we were getting late for school.
she still has anxiety at almost 9 but not so much as before. actually she now also gets headaches - rarely but intense - from maybe last year.
what has really helped i think is my reaction and talking talking talking that this is what life is. she has seen me when i had the same experience as her - wasp sting, or yelled at, not loose my mind but take it cool and composed. i have been talking to her since she was 4 - that sorry but this is what life is. she hit her hardest part at 5. feeling things intensely and deeply. like the end of the world. i've tried to show her from others perspective. or had the attitude - its no big deal. happens all the time. you'll be ok. or maintained calmness and sat with her as she lost it.
i think she has learnt more from my attitude than my words. she still has anxiety and always will, but i think she has figured out coping skills that even help her with nightmares.