Feeling guilty for switching to formula

I have a 7 week old and I only breastfed for the first 2 weeks and then I started supplementing with formula because I was so tired and started getting post partum depression. it worked up until now, switching back and forth but now he wont latch and will cry and cry until we give him a bottle. I feel so guilty but I have to switch to formula. I’ve tried nipple shields and I pump and it’s just not working. I also feel like I need to get on anxiety medicine which has influenced my decision as well. Although I know him eating is more important I feel bad for giving up. He was so good at nursing until I got lazy and started giving him formula.. how can I let myself feel better about this..