How can heart disease cause excessive sweating?
The answer lies in compensation. Take myocardial infarction, for starters. MI, if large enough, severely weakens the heart, and hence, at the same level of stimulation, it can no longer pump blood effectively, causing what is called Heart Failure (inability to pump enough blood). This causes an excess stimulation of the sympathetic nervous system (or more technically, neurohumoral mechanisms) in an attempt to compensate, which by its effects on heart contractility and rate increases the amount of pumped blood to match the need. This sympathetic outflow also causes increased sweating, nervousness, dry mouth etc. Sweating, nervousness are cardinal signs of acute MI.

Additional point: This compensation can only work in certain cases, say for example where the heart failure is due to blood loss with a healthy heart. But in cases like MI, this compensation is not an optimal response, rather it worsens the case, since increasing the workload on an ischaemic heart (ischaemic levels of atherosclerosis being the commonest cause of MI), further damages the wall leading to chronic heart failure and disease. This is the Broken Compensation Model for chronic heart failure. This is why we use Beta Blockers to abrogate the sympathetic system's (or more technically, the neurohumoral mechanisms') unwanted compensatory efforts, and the observed efficacy and increased longevity substantiates the validity of the model. 

References:

I added them in a bit of a haste. They might not be the best references available, but they are considerably credible. Pathophysiology of heart failure, ventricular remodelling and the involved neurohumoral mechanisms are well-studied, and you shall get several papers on it on pubmed or google scholar.


Books


Robbins and Cotran: Pathological Basis of Disease 9th Edition
Hutchison's clinical methods 23rd edition

Papers and links -Heart Failure pathogenesis


Kemp CD, Conte JV. The pathophysiology of heart failure. Cardiovascular Pathology. 2012 Oct 31;21(5):365-71. (General overview of the pathogenetic mechanisms underlying)
CVphysiology.com(A relatively less technical review)
Kırali K, Özer T, Özgür MM. Pathophysiology in Heart Failure. InCardiomyopathies-Types and Treatments 2017. InTech.
http://bestpractice.bmj.com/best-practice/monograph/61/basics/pathophysiology.html

Papers and links -Sweating as a symptom of MI


National Heart Lung and Blood Institute
Bruyninckx R, Aertgeerts B, Bruyninckx P, Buntinx F. Signs and symptoms in diagnosing acute myocardial infarction and acute coronary syndrome: a diagnostic meta-analysis. Br J Gen Pract. 2008 Feb 1;58(547):e1-8.
Gokhroo RK, Ranwa BL, Kishor K, Priti K, Ananthraj A, Gupta S, Bisht D. Sweating: A Specific Predictor of ST‐Segment Elevation Myocardial Infarction Among the Symptoms of Acute Coronary Syndrome: Sweating In Myocardial Infarction (SWIMI) Study Group. Clinical cardiology. 2015 Dec 1.
https://www.sciencedaily.com/releases/2005/11/051122183817.htm
http://www.webmd.com/heart-disease/news/20051115/sweating-prompts-heart-attack-care#1