你好,
Imagine you are supposed to meet a friend, you wait, and they do not show up. You put on your jacket, rise from where you are sitting, and suddenly, there they are. Would you say?
1 我即将离开
2 我正要离开
There are plenty of hits for both, but even more for 2. My guess is that 2 is more informal...