A man who was stabbed in the stomach by his volatile and possessive ex-girlfriend thought he "was going to die there and then," a jury heard.