The 22-year-old Australian has struggled with her right shoulder since March and decided to withdraw from the October 3-14 Commonwealth Games in India after consulting with her coach.
"It's a huge disappointment for me," an emotional Rice told reporters at the Pan Pacific Championships on Thursday.
"I would have loved to have been there, especially because (the Games) only come around once every four years.
"But I really have to think about the bigger picture and that's definitely London 2012 and I want to be able to get myself in the right shape and not have any problems, touch wood, heading into 2012," she added.
Rice, who won both individual medleys at the 2008 Beijing Olympics and was part of Australia's victorious 4x200 freestyle team, has had seven cortisone injections this year to help her cope with the shoulder pain.
On Wednesday, she swam a personal best in the 50 metres butterfly heats at the Woolett Jr. Aquatics Center but realised then she should take no further part in this week's meet.
"I did all right actually considering I haven't done anything (in the way of training), I did a PB so I was pretty happy with that," Rice said.
"But the real test was just to see how it would pull up after a hard race and I haven't done any hard training or anything for a while and it pulled up really sore last night," she added.
Rice, who scaled back her schedule at this week's PanPacs from seven events to three, plans to have surgery in Melbourne within the next two weeks with rehabilitation likely to last a further 12 weeks.
"It's played on my mind for the last week or so. To be decisive is good in a way, because I know where I'm going now, but it's very hard and very disappointing just to have this happen," she said.
"I've never been injured before. It's disappointing because I was really happy with my performance at the nationals," she added.