A 62-year-old man with long-standing hypertension and ischaemic heart disease presents with acute onset severe dyspnoea, orthopnoea and frothy sputum. He is tachypnoeic, hypoxic and has bilateral crackles. Blood pressure is 180/110 mmHg. ECG shows sinus tachycardia. What is the most appropriate immediate management in the emergency department?