With a view to the being necessary, pros and the articular infinitive. The impersonal verb dei here is in the infinitive and has another infinitive loosely connected with it proseuchesthai, to pray.
Not to faint (mē enkakein). Literally, not to give in to evil (en, kakeō, from kakos, bad or evil), to turn coward, lose heart, behave badly. A late verb used several times in the N.T. (2Co 4:1, 2Co 4:16, etc.).