A lapse may occur, and actually can be a useful aspect in the process - how can it be used as an opportunity to learn and bounce back stronger?
Although a lapse is common on the journey of smoking cessation, you likely will have feelings of failure or disappointment. But being hard on yourself is not helpful at all, instead of allowing the setback to undermine your self-confidence, use the lapse as an exercise in learning about yourself. What triggered it? What can you do to avoid it happening again?