Connected kernel methods in nuclear reactions: (I). Derivation of the connected kernel equations