Lattice Boltzmann simulations of droplet formation in confined channels with thermocapillary flows