Even though you share a class. You need to take a step back , don't engage in conversation. You need time to wrap your head around the fact that shes just not wanting a relationship.
Friendships can happen between you both, but its too fresh to raw for you right now. Give yourself some time. It will get easier .
Welcome to PC