Really? He's a kid. Kids get crushes all the time.
when I was a kid I had a crush on Kiera Knightly due to Pirates of the Caribbean. He just needs to get over it, find a new crush, and Rarity needs to do this..
maybe be offer him the red gem back(but we know he'll say, keep it) but again, it's like ripping off a leach, it hurts at first, but you feel so much better when it's off.
something like this
Rarity: Spike..." She started. "I'm flattered but... I just don't feel that way about you." Rarity sensed that Spike was getting even more upset and quickly said. "Don't get me wrong, darling. I love you, I do. You mean the world to me. But I love you like an older sister would love her little brother. Besides, I'm too old for you. You... You know that right?"
Best idea I've read in fanfics was he wanted to get over his crush on Rarity cause he knows it ain't happening, he asks his good friend Discord for help, so Discord gives him a potion from his dimension that can make you lose all interest in the one you have a crush on, he forgets however to warn him to take only a sip each night for it to work properly, and Spike drinks the whole thing, at first it seems to work, he no longer "loves" Rarity, but soon a new feeling has come, hatred. He starts pulling cruel pranks on her, messing up her dresses and throwing cake at her with comments like
Spike: Take that fatty!
Spike: (nasty chuckle) You should see the look, on your ugly, stupid face! (Falls over and laughs)