Did I do something unforgivable? I loved her a lot I promise? How to forgive myself?

My cat was my first ever pet, stayed with me for 1.5 years. I loved her , kissed her, celebrated her birthday, gave best diet , always took her to vet. She slept with me for 6 moths of her life. I was extremely possessive for her. She used to sneak out of the house and get lost. She had 3 kittens, due to that her life changed. I didn't want her to have more kittems plus it will shorten her life span, i was way worried of losing her. I used to put them in my room but my parents scolded me. My father made a cement cage for her, we put her inside it for a year. She would be inside for 24 hours and will only come out to eat and out for 2-3 hours in my supervision. Her litter box inside would get smelly and remain unchanged for a day or two sometimes. Whenever i'll pass she would be meowing with sad eyes to let her out. Her kittens would be freely walking in front of her. I made sure to give them proper water and diet i just didn't let her out in fear of her having kittens or me losing her. I didn't had Money to spay her, once i arranged the money and get her spayed. I was out of city and as i was so tired i didn't check on her for 1.5 day. And yesterday when i took her out she was vomiting. I took her out, whole night she was vomiting and she pooped a little blood and worms i put her in my blanket and was cleaning and taking care of her the whole night. Here at 3am you will find no vet. At 8am she took her last breathes , vet said she already expired. she didn't show any symptoms before like of weeks i didn't know she would die in a night. It was unbelievable. i cried whole day , was miserable. I tried my best to burry her in a good place. what i did with that innocent soul i caged her 85% of her life. I can't forgive myself. She never showed me like she hated me it always felt she considered me her mom and loved me. I feel horrible about myself. But i promise i was going to let her out forever once i spay her. One more week she would be enjoying fredom.
Did I do something unforgivable? I loved her a lot I promise? How to forgive myself?
Post Opinion