DD (now 9) arrived home in from school in second grade (then age 7) calling herself "stupid." Turns out that she was in "differentiated math" for the first time in her life, and my theory is, that for the first time in her life she saw some kids actually do some things faster than she did (she is not a phenomenal rote memorizer, and she actually had to put EFFORT into learning math facts, lol). She adapted, she learned her math facts, and is now excelling in math.

DD can be subject to black and white thinking, as you describe. She was quite dramatic about it at the time, so it WAS worrisome. I am going to bet that having the new peers (and possibly some new expectations) require some adjustment on the part of your DS.