Martinez broke a metatarsal bone in his foot during Manchester United's 2-2 draw with Sevilla in the Europa League on Thursday.
The 25-year-old made 45 appearances in his debut season at Old Trafford, scoring one goal and had been indispensable at the back.
Martinez has helped the Red Devils win the Carabao Cup this season but will have to watch from afar as Erik Ten Hag's side battle to win the Europa League, FA Cup and secure a place in the top four.
Writing on Instagram, Martinez said: "Not the way I imagined what's been a very special season would end, but sometimes we face obstacles along the way that we have to overcome to make us stronger and we learn from them.
"I know that I'll be back very soon to go for more. In the meantime, I'll continue to support all my team-mates to achieve our objectives.
"The number of messages and support I've received has been amazing, they're giving me strength and encouragement at this moment.
"Many, many thanks to you all from the bottom of my heart."