Your friend has been gone for only a month. What you are describing is common for someone who is in the early stages of grief. Without someone to talk to, you haven’t been able to process the loss. This coupled with your other “loss” — your boyfriend’s attention — makes you want to just stop the world for awhile. I sympathize. Loss to suicide is especially difficult for those left behind.
Since you don’t have a friend you can trust, I encourage you to find a counselor or spiritual leader who is experienced in helping people manage grief. There is no shame in reaching to professionals, especially when someone doesn’t have a natural support system. You need to talk this out.
If it is possible, it might be helpful to take a break from school until you feel better. You are clearly smart enough to master the exams. But your current emotions are likely to get in the way of doing well. Explore whether you can take your exams in a few months – after you’ve had some counseling.
When you get to a better place in the grieving, I hope you will also work on becoming less dependent on so few people. As you’ve discovered, when a person has a limited support system, they are vulnerable to feeling alone when they most need someone to talk to.
I wish you well.