The Italy international returned to action last month following a lengthy spell on the sidelines after undergoing minor heart surgery.
"I was optimistic after the operation" Cassano said to Italian magazine Chi. "But when I saw [Vigor] Bovolenta and [Piermario] Morosini suddenly die during games, I wanted to quit."
Italian volleyball player Bovolenta collapsed and died during a league match in March while Livorno midfielder Morosini suffered a cardiac arrest and died during his team's Serie B game at Pescara just one month later.
"I was in shock," Cassano said. "I was incapable of making any decisions. My wife was worried as I just sat on the couch and stared at the wall.
"I wanted to finish with football. I would say: 'I'm done here. I'm gambling with my life.' But when the doctors told me I could go back to playing again, I cried."
The 29-year-old Cassano was given the all clear by a ten-man committee of experts to resume playing on 4 April and made his return days later in Milan's 2-1 win over Fiorentina.
"I will never forget the moment I returned to the field and [Milan] coach Massimiliano Allegri told me to get ready," he said. "My legs were trembling as never before, not even when I made my Serie A debut. I was coming back to life and I felt like the happiest man in the world."
Cassano, who was Italy's top scorer in qualifying with six goals, was included in Cesare Prandelli's preliminary squad for UEFA EURO 2012 and is set to lead the Azzurri forward line at the tournament.
"Prandelli always put his faith in me and never let me go," he added. "Now the EUROs are coming up and I am ready. We hope to do well."