I think the parameters for that transform should be taken from your dataset statistics, not random values. That does not sound right.
This is not specific to PyTorch though you would need similar preprocessing for many ML framework.

Do we have any built-in preprocessing function in Pytorch corresponding to tf.keras.applications.resnet.preprocess_input?

I guess that would be the proprocessing when using images from imagenet no? Do your images have the same distributions? I think you need to check that and make sure they do by doing the right normalization.