A 70-year-old man with ischaemic heart disease is admitted with acute dyspnoea, orthopnoea and pink frothy sputum. He is tachypnoeic with widespread crackles and oxygen saturation of 88% on air. Blood pressure is 170/95 mmHg. Chest X-ray shows pulmonary oedema. What is the most appropriate immediate management?