Sometimes we can't seem to be able to comprehend on why people can be so affected from losing a loved one. We don't know what to say or do when we encounter such situation. I believe the best thing to do in such situation is just listening and if you believe in God, you can pray for them. Lastly, you can refer them to a bereavement service if there is any around your area.
According to the Kübler-Ross model, we would go through a series of 5 emotions: Denial, Anger, Bargaining, Depression and Acceptance. There is no fix pattern on how one would go through this process, one might swing from one stage to another.
From my personal experience, I went through everything apart from Denial. I constantly swung from Anger and Acceptance and I can tell you that it is not easy. Social support is also very important during this process. You should let your friends know what you're going through, distract yourself with work or anything that would prevent you from thinking of the past. I hope no one has to go through this grieving process but please remember that you're not alone and it's not the end of the world.
May peace be with you.