The pumpkin is good, add a bit of raw unpasteurized honey [ good for their upset tummies and most beardies love it ] and extra water to feed via syringe if you can. Vomiting can dehydrate them so that should help.
That is definitely helpful, using the pumpkin in case of any impaction that could be present.
Does your dragon ever ingest any of that loose substrate?
Keep us posted on how they are both doing. I hope they are feeling better.