I am ever so sorry for your loss! An unexpected death is sadly very upsetting, but it can happen at any age. Heart attack, sudden acute heart failure and strokes can happen right out of the blue without any warning, and they are not anybody's fault. But as a loving owner, it is very typical for the onset of the grieving process that you need to make some kind of sense of what has happened and that you suffer from feelings of having somehow failed your beloved pet. If you find that you really need a full answer, then only a post mortem examination at the vets can help you; but it is not cheap and you may find the thought upsetting.
Grieving guinea pigs are usually withdrawn and don;t want to be handled or cuddled. It is rather distressing to experience because you feel exactly the opposite. The crucial point is whether your bereaved guinea pig is still eating (even if it is only listlessly) or whether she has stopped eating completely. In the latter case, we speak of acute pining, and in this case, you need to find a new friend asap. If she is still eating, she still has got the will to live and will eventually come out of grieving on her own. It gives a bit more time to look for a new companion and to set up - if that is possible - a meet&greet date at the rescue. With a bereaved sow, you can look at either sows or neutered boar of any age, as long as they like each other. I have done this with bereaved sows of mine several times, and have always ended up with a very loving new relationship, whether is was another sow or a neutered boar.
You may find our detailed tips in this information thread here helpful:
Looking After A Bereaved Guinea Pig
If you please added your county (as your are obviously in the UK), we may be able to help you with recommendations of suitable rescues within your reach. Click on your username on the top bar, then go to personal details and scroll down to location. We have got members from all over the world. Adding your area helps us to tailor any advice to the individual needs instead of keeping any advice general.