I used to handle my ball python (female, about two and a half years old) all the time but I started having less and less time for her. I tried not to handle her much as she starved herself for a few months and I didn't want to stress her out more. She bit me for the first time a few weeks ago and has been very aggressive ever since. She used to sit idly whenever I opened her terrarium, but now, she comes out of her hide and slithers upwards looking for a mouse. I have to use the lid of the terrarium to keep her on the opposite side of the tank while I change the water just to keep her from biting me. I'm at a loss for what to do as this is my first snake and I'm not sure how to reverse this aggressive behavior without being bitten repeatedly or stressing her out excessively.
*Note: She used to be very good-tempered, always calm, curious, and comfortable with handling. That seemed to change after I stopped handling her as frequently, I relocated her to a different terrarium, and she began eating again after having starved herself.
What can I do to make her again be familiar with me and not attack me or try to eat my hand every time I open up her tank?
TL;DR: My previously very calm snake has now become very aggressive and tries to bite me whenever I reach into her terrarium; how can I reverse this behavior?