Fidel Castro's eldest son has died by suicide after undergoing months of care due to a deep depression, according to Cuban official state media.

Fidel "Fidelito" Ángel Castro Díaz–Balart died Thursday, Granma reported.

He was hospitalized at first while undergoing treatment before being released for outpatient care, Granma added.

At the time of his death, he was serving the regime as a scientific adviser to Cuba's Council of the State and as vice president of the Academy of Sciences of Cuba.

Castro Díaz–Balart was an "author and editor of several books of great strategic importance in matters of progress and trends of contemporary science," according to the Academy of Sciences of Cuba.

"He has taught many presentations, lectures and has represented Cuba in events, scientific and high-level authorities meetings for Science and Technology in several countries, UNESCO, TWAS," the academy wrote on its website, adding he was an expert in nuclear physics.

Fidel Castro, the father of communist Cuba who led the country for nearly half a century, died Nov. 25, 2016.