Applegran. It is a sad fact of life that, as we grow older, our circle of friends and family diminishes. I have lost my husband and quite a few friends in the last few years. When someone dies we always have a number of "I wish that..." "Why didn't I...." "If only...." It's part of the grieving process. I hope that you will soon be able to remember the good times with your friend, and come to terms with the sadness.
On a practical note - I hope that you are able to contact your friend's family, and have a chat about your friendship, and share their loss. I have been in the position of hearing that someone has died and not having any means of contacting the family. As for myself, I have compiled a list of names, addresses, phone numbers and email addresses of all the people who are to be contacted when I depart this life. It will make things a bit easier for the family, when the time comes, and avoid people being upset at not finding out what has happened.