Short Answer
If a friend hands me a marijuana edible then dies of a heart attack am
I guilty of felony murder?
No.
Long Answer
Felony-murder is defined by statute on a state by state basis in 46 states, usually, but not always, as a way of causing a murder conviction to be eligible for the death penalty or life imprisonment without the possibility of parole, and as a way of casting a broader net of criminal responsibility than a criminal conspiracy charge. The extent to which a death must have a causal nexus with the felony varies from state to state.
But, "felony-murder" is almost always narrower than the plain language of the name of offense would suggest. Usually, felony murder is limited to deaths occurring in a handful of particularly serious enumerated crimes, and not to all felonies. Drug offenses are rarely included in the list of felony-murder offenses. Similarly, felony-murder almost never includes fraud offenses, bribery, immigration violations, felony drunk driving, or felony tax offenses.
For example, in Colorado, the predicate offenses for felony-murder are committing or attempting to commit arson, robbery, burglary, kidnapping, sexual assault, or a class 3 felony sexual assault on a child. Colorado Revised Statutes § 18-3-103.
There is some variation in the list of predicate offenses, but Colorado is fairly typical. The Model Penal Code, which was used as a starting point for drafting many modern state criminal codes, with a great deal of local variation in the particulars of punishments and offenses, lists robbery, rape or forcible deviant sexual intercourse, arson, burglary, and felonious escape as predicate felonies upon which a charge of felony murder can be maintained. The federal criminal code lists killings "committed in the perpetration of, or attempt to perpetrate, any arson, escape, murder, kidnapping, treason, espionage, sabotage, aggravated sexual abuse or sexual abuse, child abuse, burglary, or robbery; or perpetrated as part of a pattern or practice of assault or torture against a child or children." 18 U.S.C. § 1111.
There are a separate class of crimes that some states have adopted that treat deaths caused by illegal drugs as homicides committed by the dealer of those drugs. But the fact pattern in the question does not suppose that the heart attack is actually caused by the drug in question, unlike a case where the marijuana edible might be cut with fentanyl which causes an overdose death that was not anticipated by the buyer of the illegal drugs. See, e.g., here.