Breastfeeding mother .. what to do ?!

Ok I breastfeed my 2 month old I recently started pumping incase of any emergencies and such .. I recently been hurting so now I'm at the hospital an now having to stay for a couple nights ( has nothing to do with breastfeeding btw ) but they have me on medicine I cannot breastfeed my baby so basically they told me to pump an dumb which is soooo hard to do bc I don't make alot by pumping .. anyways I've been so tired latley and I feel so down bc I cannot feed my child the way I planned to do so .. so I'm pumping but I'm not exactly sure like how long should I pump and how many times a day I've looked up online but still unsure so if you could please help that would be awesome

And also I have another problem my left nipple started bleeding while pumping I've never had that happen so I'm not sure why or how to help heal it bc it hurts to pump on that one so any advice would be great !!

Thanks 💕