Scalar mesostatic field with regard for gravitational effects