I hung on to my first dog several weeks longer than I should have. I know it's rough, but hopefully in the long run you'll feel that you did the right thing by him letting him go at the right time.
IMO the best way to approach life is to try to maximize the number of good days in it and minimize the number of bad days. I'm sure in those 12 years you gave him plenty of great days.
Neither are forklifts. It's an analogy, not exactly the same thing.