My daughter went through this in K and was very sad about it, but now that she's a little bit older, it has gotten a LOT better. We did take her to counseling for a while to come to terms with her gifts, and to understand that most other kids (and adults) just don't think like she does. She's old enough now to realize that there are lots of different kinds of people, everyone is good at something, everyone is stinky at something, etc. So she has different friends for different activities, including 1 friend who is PG and thinks in a very abstract, imaginative way. Finding the 1 person who is EG or PG is really important, I think. The rest of the time, my daughter plays just fine with other kids, is in Brownies, church group, etc, but she does realize that the other kids play just "regular" kids' games, which don't feed her need to pretend she's Abe Lincoln, or that she's flying through the solar system, etc. It took some time and a lot of reassuring her, and a constant repetition that her brain is amazing and wonderful, and can do such awesome things. We've tried really hard to keep her from getting "mad" at her brain & her differences, without letting her get too big of an ego.
A long way of saying that counseling will probably help, but time will help too, and maturity. But it breaks your heart now, I know. Good luck, and I hope your daughter is doing better.