If you take all new M&T shares, your total cost basis will be the same as before but over the new share total. Just divide your old share total cost basis by the new shares you receive. No capital gains tax until you sell the new shares. If you elect to take cash, it's the same as selling your shares. If it is a combination of cash and shares, it depends upon the cash received vs shares received at the time of closing.
Before taking any amateur answers I think you should wait for the proxy statement that should be coming out before the shareholder vote. Too many variables to even guess at what the treatment will be especially if shareholders can't take all stock in the transaction and even then there is nothing to say an exchange of shares would be on a favorable basis. BTW, pray for continued favorable cap gains treatment