Self confidence lost

I know I can’t be the only one but has anyone else been through this? At the beginning of mine and my SO’s relationship I was really confident about myself and now almost two years later I’ve gain probably 10 pounds throughout our relationship. I’m still somewhat confident in myself but I have more bad days than good days.. how to do you deal with not having as much self confidence as you used to? As much as my SO says nice things to uplift me and says I’m still perfect, It’s always still in the back of my mind.