I am so very sorry for your loss! He was much too young!
The only definitive diagnosis would have come from a post-mortem exam. Since I assume that a post-mortem has not been performed, than, your dog may have had a congenital abnormality (malformation) of the heart, or vessels of the heart that was not compatible with long life. This would have been difficult or impossible to foresee, especially since it sounds as if the problem had no warning signs, i.e.: prior episodes of sudden shortness of breath, or acute collapse/fainting episodes, or heart murmur.
Another cause of death would be ingestion of a deadly cardiotoxin, or other toxin, in the form of poison mushrooms, or other poison.
Please notify your breeder, if you have not already done so, to warn the breeder about possible abnormalities in your dog's siblings, or in the blood line.