I cried. A lot. It's amazing to realize how much more you love them than many people in your life.
It's going to hurt. A lot. I remember feeling like I couldn't breathe at times, not grasping the fact that he wasn't there anymore (we grew up together, and I wasn't the most social, so he was a huge part of my life). For me, crying and being able to talk about it (at length with friends/others who can relate) made it more natural to think about them and not cry, and within a few days I even tried remembering the most hilarious things he did, and went out of my way to joke about him. But you'll still cry, and I'm sorry.
Things like this happen in life, and everybody has different levels of grieving, as well as different coping tools. If you feel that you would fail everything, I strongly suggest that you talk to somebody (administration). Regardless of what others think ("it's just a pet"), you're feelings are still real, and must be dealt with accordingly. You'll learn to push through, because the alternative (screwing up academically) is not viable.
Also, I was there for his euthanizing. The vet was extremely compassionate, and I remember feeling this weird type of relief, an almost thankfulness that he was honest, trustworthy, compassionate, and patient; and if anything, I left there with a motivation to be the best physician I could be, because if I could make at least one family member/patient feel like I'm truly on their side when sh** hits the fan, I owe it to them to be that person.
And most importantly, look at my signature. That's probably the closest I've come to any sort of belief, because my dog was too good for it to not be true.