The 33-year-old forward was forced off the pitch against Alaves in his first home debut for Barcelona in the 42nd minutes and after was taken to the hospital due to breathing difficulties.
After several tests, the club fears the former Manchester City goalscorer might have to retire permanently from football with the heart issue appearing more severe than expected.
Before his substitution, Aguero was visibly struggling to breathe towards the end of the first half, lying down after clashing with an opponent in the 18-yard box.
He was able to get back to his feet swiftly and walked off.
El Chiringuito presenter Jose Alvarez Haya later reported that his heart rate was much higher than it should have been.
Barcelona issued a statement following the incident that reads: "The player Kun Agüero has undergone a diagnostic and therapeutic procedure by Dr. Josep Brugada.
"He is out and for the next three months the effectiveness of the treatment will be evaluated to determine his recovery process."
Aguero said after he was taken to hospital: "I am well and in good spirits to face the recovery process. I want to thank you all for so many messages of support and love that make my heart stronger today."