The 37mm M1 towed and vehicle mounts were used until the end of the war in the ETO and MTO, although the 40mm gradually increased in use as the war progressed - particularly as replacement for the 37mm towed mounts (I think).
The towed 40mm replaced the towed 37mm more quickly in the PTO, partly due to the loss of most of the forward based US ground force's equipment early on in the war - later it was largely due to the USN also using the 40mm so supply was easier. I do not know if there were any number of vehicle mounted 37mm or 40mm guns deployed in the PTO.
There were a lot of 37mm still in service in the ETO/MTO on VE day, not very many in the PTO on VJ day.
I have no idea how common the 37mm and 40mm were in the CBI.