“May God do so to me, and more also.” This is a curse formula. If literally fulfilled, Jehoram was saying that if Elisha was still alive at sunset, which was the start of the new day in Jewish time, then Jehoram should be executed. Of course, he never honored his statement.
“if the head of Elisha the son of Shaphat is left standing on him.” This is an abrupt turnaround from Jehoram’s behavior in 2 Kings 6:20-23, when king Jehoram listened and apparently honored Elisha. But Jehoram was an ungodly man who did evil in the sight of Yahweh (2 Kings 3:1-2), and he was the son of Ahab and Jezebel (2 Kings 3:1; 9:22), so idolatry ran deep in his family and heritage. Although when he started to reign he put a stop to some of the outright worship of Baal, by the end of his life his kingdom was rife with Baal worship, which Jehu tried to end (2 Kings 9:21-26; 10:18-28).
Jehoram seemed to have governed his life like his father Ahab did; weak-willed and emotionally unstable, he acted on the way he was feeling at the time rather than on well-thought-out principles and practices. He likely thought that if he had killed the army of Syria when he had the chance that this attack would not have happened, and since Elisha advised him not to kill them, this siege and famine was his fault.