The painful way is pretty simple! Wait until you have a few days you can be "down" and just go cold turkey. I find I do OK the first couple of days, then get a pretty bad headache. When that's gone I'm back to normal.
This. The withdrawal symptoms of coffee usually last for about a week. The thing that is perhaps most surprising is that after that week you'll also feel less tired. Turns out that while most people consider coffee as a remedy to tiredness, it's the coffee itself that actually makes you more tired, so you need more and more of it, just like any other addictive drug.
I'd like to point out that gradually decreasing the amount of caffeine intake works very well and is a lot less painful.