Use a ‘commitment contract’. This is a way to impose costs on self-control failure.
For example, you sign a contract with a friend or a company and place a financial deposit. You only get your deposit back if you meet certain criteria after an agreed-on period of time. For instance, you need to cut down your smoking to a few cigarettes a day. If you don’t satisfy the criteria, then you lose your deposit.