Actually i was dancing and exercising lile crazy before i was about to hospitalized (my heartbeat slowed down) so its not safe for me to exercise i guess
Exercise is vital for everyone. You most likely overexerted relative to your current level, while simultaneously were malnourished. These two combined are likely reasons you had physical complications and a hospital visit.
In the future, here I suggest some changes.
Be aware of your current physical limitations, and eat well before and after exercising. Exercising with too full of a belly can be discomforting, cumbersome, and even cause nausea. Too little food means nothing comes out of exercising. Here we must also differentiate the contents of the stomach and muscle glycogen storages, the former can be empty, but if the latter is empty you will suffer. Next, exert the amount that does not exhaust you, but also challenges growth. Exhaustion is okay once in a while for healthy individuals as it promotes another type of response for growth, but it requires basic needs to be fully met.
Sleep is crucial with the above, and in general as well. Have an adequate amount each night. For most people, this falls between seven and nine hours. It can be more when the body and mind adjust to greater heights.
Lastly, make sure that the nutrition you take has all the necessary building blocks for you specifically, both macro- and micronutrients. We are individuals in different environments so our needs can vary quite a bit.
This is a simple guideline, the specifics you need to figure out yourself.