Plenty of times. Mexico has only gone to the WWC three times out of the (now eight) qualifying campaigns
(If you mean specifically from the group stage, then) They finished 3rd in their group in 1991 (the first year of the WWC). Since then they've never finished worse than 3rd overall (for the tournament), though that typically meant having to play Japan for that final World Cup spot.
(The story so far) #PANMEX #WWCQFINALPanama 2, Mexico 0MEXICO ELIMINATED FROM WOMEN'S WORLD CUP#MEX dominates possession, outshoots 18-10, but #PAN defense, led by GK Yenith Bailey, keeps them out of goal, including a blocked penalty kick— Jeremy Parker (@astutepanther) October 10, 2018 Last time was in 2007 - Japan beat Mexico in the intercontinental playoff (when the 3rd-best CONCACAF region team played an AFC country, unlike now when they play a CONMEBOL team). - https://www.fifa.com/womensworldcup/news/nadeshiko-put-foot-china-113151 (Archived)
By the way: Japan at the time was a stacked-up team (just consider that in the first leg of that play-off Japan's scorers were future World Champions and world-beaters Homare Sawa and Aya Miyama), but it was a very difficult moment for Japanese women's football. Some years ago, I saw a very good video where some players from that team were remembering the thrilling second leg of that play-off in Mexico (Japan lost by 1-2 there, so they managed to squeeze in anyway): the players felt that what was at stake wasn't only the qualification to that World Cup (Japan never missed an edition so far), but probably the very survival of women's football in Japan. Many had the feeling that, if Japan had missed the World Cup, the national league could have easily folded. Luckily Japan made it, the movement went on and they subsequently became World Champions 4 years later. I feel for Mexico, but I guess they somehow looked for it: for too many years their NTs were firmly in the hands of the Cuellar's dinasty. They stagnated for long and the aftermath of that is still here to see, despite the fact that Cuellar finally ended his near-20-years tenure in 2016.
yeah, Mexico needs an overhaul. To get knocked out by Panama, a team that hardly plays year round is sad. Out of 8 World Cups, Mexico has only qualified for 3 of them('99, '11, '15) and never made it out of group play.
One could easily argue that the overhaul is already underway, what with a new league and a new coach. But it's definitely worth pointing out that undoing years of damage takes time: Remember that, while Mexico had long been the #3 team in the region, they started consistently losing to Costa Rica by the end of Cuellar's reign, including two friendlies and one match each in 2014 WWCQ and 2016 OGQ.
Jamaica hasn't officially gotten the second spot from Group B yet. But realistically, yeah, it'll be between those two for the 3rd spot. And hopefully whoever doesn't win that spot is able to get past Argentina.