Leaving Early

I was leaving work early after getting back from the hospital. I know I wasn’t supposed to. My boss called me out on it. I know I shouldn’t have. I think she could have been nicer in telling me. How do I forgive myself? How do I not make it mean I’m a horrible person?