I am so sorry about your sad loss!
He may have had a hemangiosarcoma of the heart or spleen which burst, causing a sudden bleed out. Other causes of the symptoms you describe are ingestion of rat poison causing sudden hemorrhagic anemia, gastrointestinal splenic hematoma, or hemangioma that burst, or other causes that could have resulted in severe internal hemorrhage.
Hemangiosarcomae can be symptom-free for a long time until they burst.
These are of couse just guesses based on your description, please have a post-mortum performed, if you can, for definitive diagnosis.
we already buried him with another friends dog.
White gums are often a sign of shock. Now what caused the shock is hard to say. Are you going to take him in to the vet for a necropsy to find the cause of death? You can do that, not sure how much they charge for it.