After the extremely lopsided Texan victory at San Jacinto in April 1836, many Texan soldiers- understandably- wished to hang the captured Santa Anna, after he was taken, on the spot in revenge for the atrocities committed by Mexican forces at the Alamo & Goliad. Sam Houston however had the Mexican dictator spared so's that he could sign a peace treaty guaranteeing Texan sovereignty. WI though the more vengeful among Houston's officers or men had their way, managing to overwhelm Santa Anna's guards then lynch him ?
Believe it or not this would have been great for Mexico in many ways.
While the Mexican American war would probably still happen the results could be much different.
First of all you would not have Santa Anna coming back to and from power every few months for the next 10 years before the Mexican American starts. Which gives you some stability. Not much but it can't be worse than OTL.
In the interim years, you would basically have the same "parties" as in OTL forming: a fervent nationalistic side that refuses to recognize Texan independence, probably lead by Paredes, Salas, and Alamonte. And more moderate willing to negotiate party lead by Farias and Herrera. The depending of who is on power and at what time the war will happen either sooner or later and with varying results. It also depends on who is president of the US when the war happens.
If the war happens sooner it will probably just over Mexico's recognition of Texan independence and the legality of a likely future annexation of it by the US. Alta California will not be involved.
If the war happens around OTL or a bit later. It is most likely that cooler heads like Farias or Herrera have triumphed in Mexico. Thus it is once again likely that the mater will only be over Texas. However Alta California north of San Fran Bay, basically dropping the northern border a few latitudes south, might be a possibility over a treaty.
Finally Santa Anna will not be coming back to power in 1853 after his exile in Colombia. Without Santa Anna then, there is no need for a liberal coup in Mexico in 1857. This then translates into no new constitution and no conservative coup a few years later. Thus no Second Empire and no Civil War in Mexico.
If liberal leaders like Farias are in power this early it might cause an earlier "War of Reforma" as religious tensions could build up sooner. The US probably would back Farias liberal government. If the liberals are triumphant it could mean a stabler Mexico earlier on.