Yes, artificial conception is grave matter against the sixth commandment, and additional offenses of grave matter against the fifth commandment arise if embryos die or are destroyed in the process (which is almost always).
Your third option would be to adopt a child if you need to have your ovaries removed and want to welcome another child into your home.
You could also consult another doctor for a second opinion about treatments that reduce or eliminate your pain while keeping your ovaries.
I would encourage you to read the Church documents Donum Vitae and Dignitas Personae to understand what the Church teaches and why.
This isn’t a rule, a discipline, which could have an exception. These sorts of procedures are grave matter against the commandments of God— this means they are intrinsically evil. There is a book called Twelve Tough Issues, What The Church Tesches And Why (out of print but you can get it used on Amazon) by Archbishop Daniel Pilarczyk. It explains this well, not quite as technical as the two Church documents I also recommend here (those are available online, just Google them).