Your question really tugged at my heartstrings.
First, I'm sorry to know that you lost your husband .. and that your kids lost their Dad. It can have effects on your daughter that you are not even aware of.. and that she might not be able to express. Little kids are afraid of rejection just like us, There is a possibility that in her young mind, she somehow feels like she "did" something to make her dad "go away" I know I felt like that when my mom died, and I was a teenager!
That aside, I and my younger daughter were both shy with other kids, and had no real friends till 12 or 13. Maybe it's a genetic personality trait? We both have high IQ's and both of us took a while to figure out how to "be" around other people. Relating to grown-ups was no problem, but we were "different" than out peers, and that's a hard thing to be when you're that age.
To make it easier, try some play-dates where you can keep an eye on the interactions. Have her pick a classmate for a one-on-one visit, or at least keep it even numbers of girls. Odd numbers of girls usually turn ugly, it's easier to create the "odd girl out".
I know seeing this is hard for you. Maybe you could find some enrichment programs, or if your school has a gifted and talented program, you should consider having her tested for that. Smarter kids often have trouble getting along with their classmates, but are at ease with other kids like themselves, or with grownups.
I wish I had some more helpful advice...