Thanks for clearing that up; it is very difficult to make any educated guesses without having the full picture.
In this case you are dealing with Ernie's attempts to desperately trying to revive Bert; that is actually not uncommon. Sometimes piggies can nibble deeply right down to the bone in their desperation.
Try to take consolation that the end must have come very quickly, gently and totally unexpectedly for Bert; and that he can't have suffered for any length of time. Companions usually know when their mate is ill; they generally react very differently to a passing that they know is impending.
Concentrate on taking care of Ernie. He is currently very upset and grieving himself.
Looking After A Bereaved Guinea Pig