How about
dt[, (names(dt)) := lapply(.SD, function(x) x/mean(x))]
If you need to specify certain columns, you could use
dt[, 1:40 := lapply(.SD, function(x) x/mean(x)), .SDcols = 1:40]
or
cols <- names(dt)[c(1,5,10)]
dt[, (cols) := lapply(.SD, function(x) x/mean(x)), .SDcols = cols]