Variational infinite matrix product state (iMPS) calculations usually make Hamiltonians with algebraically decaying interactions compatible with standard MPO algorithms by first replacing the target Hamiltonian with a finite-pole sum-of-exponentials surrogate, thereby introducing a Hamiltonian-representation residual. We formulate the fixed-D variational energy without introducing such a surrogate. For a fixed finite-D MPS, the algebraic tail can be summed directly through the connected transfer matrix: the tail eiQr/rα is represented by the matrix function Fα,Q(TA), with Fα,Q(z)=Liα(eiQz)/z. We evaluate the resulting matrix-function action using a Krylov method and obtain stable gradients by combining a Fr\'echet adjoint with implicit fixed-point differentiation. Benchmarks on long-range free fermions and the inverse-square Heisenberg family, including the Haldane--Shastry point, validate the transfer-matrix-function formulation. A long-range Ising-chain calculation illustrates a practical consequence of avoiding a finite-pole Hamiltonian representation. At a fixed, independently known critical field, finite-pole surrogate Hamiltonians can bias a critical diagnostic away from criticality, whereas the matrix-function calculation retains the expected critical signatures of the target algebraic Hamiltonian.