Hopey, I think a lot of mothers understand these feelings, and they don't always refer just to feeding. I think just about every parent does something they regret with hindsight - it's part of being a parent, learning from experience, and just trying to do your best at the time.
'Guilt' is something you feel when you could have done/not done something, and you ended up doing it/not doing it out of malice, or spite, knowing it was wrong.
I would be amazed if any of that applied to you in your tired, depressed and pressured state.
It's understandable to feel sad, though, and to draw links between what happened and your dd's ear infection - of course she may have had the ear infection anyway, as you know.
Part of growing as a parent is to differentiate between 'guilt' and 'regret' - 'regret' does not involve self-blame, and it allows us to learn and maybe do something different next time, if there is a next time. If there isn't a next time, then 'regret' also helps us place the incident in the past, where it belongs...and to move on.
To tell you, as some people might, that it 'doesn't matter' that you did not breastfeed for long, is to ignore and deny your genuine feelings, and to treat you like a child. It's just as bad to pretend that formula milk is a close match to breastmilk - that doesn't help anyone, especially people who may need the full picture in order to make a decision for themselves.
Breastfeeding is not the only way of mothering and caring. You can do this beautifully with formula and bottles, as I am sure you know.