I think there are a few parts to your post- it's a hard reality in life that it's only the few who win the prizes, get olympic gold medals, get an MBE etc. and school is the first lesson in this. The majority of people are in the middle ground, doing well but not exceptional, and our role as parents is to make our children feel seen, valued and appreciated where ever they are/what ever they are doing (with in reason obviously!). It's normal for children to be disappointed when they don't get a prize etc, but if it's having a longer term detrimental effect on your son I wonder if that's partly because he feels he needs to get an award/main part etc for you to value him? Resilience against these disappointments comes from knowing that you value and appreciate him whether he gets an award at school or not. Celebrate his achievements as a family in different ways, cook his favourite meal, have a family movie night, make him a certificate to go on his wall...
If kids are on a team together/doing an activity together it's natural that they will have a closer bond, leaving your son feeling isolated from them, so that's where you need to be creative to find ways for him to strengthen his connection with friends outside of school. You could having them over after school for a few hours, take them to the park/woods/beach etc. Do it regularly.
Finally, and equally importantly is the issue that he feels overlooked in class, speak to the teacher, explain that he'd like to participate more and ask how you can support him to do this? This let's the teacher know that he's feeling overlooked, but in a constructive way- you'll get nothing by accusing the teacher of ignoring your child.
He may be in the top 25%, but if there are a couple of awards per class- that's not enough for everyone in the top 25% to get a prize, your expectation that the teacher's statement automatically meant he'd get a prize is unrealistic.
If there's a criteria that's set for recognition eg everyone over 85% attendance gets an attendance award, that he's met, and hasn't been recognised for then I'd mention it, but not if it's a case of 'over 85% makes you eligible' but only 1 person gets an award, there will always be someone lucky with 100%. Attendance awards are crazy- they encourage sick children to go to school, and penalize the ones who are ill through no fault of their own (sometimes due to another sick child coming to school so that they can get their 100% attendance, at the expense of the other children they spread their bugs to!).
You obviously care deeply for your son, it's heartbreaking when outside factors affect our kids outlook, but that's when as parents, we have to pick them up, show them that their value is far greater than a prize, and help them find what they shine at...