In this paper, we obtain a closed form for the covariance function of a general stationary regenerative process. It is used to derive exact asymptotics of the covariance function of stationary ON/OFF and workload processes, when ON and OFF periods are heavy-tailed and mutually dependent. The case of a G/G/1/0 queueing system with heavy-tailed arrival and/or service times is studied in detail.