Yes, unless you qualify for FMLA. Clearly, your situation meets the definition of a "serious health condition" under the federal Family and Medical Leave Act.
In order to determine whether this applies to you, you need to post back and tell us (1) how long you've worked for this company (2) approximately how many employees they have and (3) whether you are full-time or part-time.
And just to clarify, did they fire you for being absent or did they fire you for not calling them and reporting your absence?