Oliver Goldsmith said this quote

A great source of calamity lies in regret and anticipation; therefore a person is wise who thinks of the present alone, regardless of the past or future.