I was raised Catholic, and this is one of its fundamental teachings.
The current wisdom is that one cannot love anyone else unless one loves oneself first. As Whitney Houston sang -- learning to love yourself is the greatest love of all.
When I tried putting myself first, my home turned into hell on earth. When I reconciled myself to suffering for my family, I remembered what love is really about.