When to use do: Do can act as a main verb with multiple meanings, most of which involve performing or completing a task. It is also frequently a helping verb, which is used in addition to a main verb to form a question or negative statement. It is only a helping verb in sentences in which the main verb is not be or a modal verb.
When to use due: When due is an adjective, it means owed at a certain time or expected to be complete. It can also mean proper or adequate. As a noun, it can mean something that one owes. As an adverb, it is not common. It only appears in the sense of heading a certain direction, and means directly.
examples in the comments.