Caffeine problems

Ally
Any suggestions on how to give up or reduce caffeine intake? I tried giving it up all together, but I get horrible headaches & shakes if I don't drink any. I've tried cutting back but always give in to the craving and I know it's not good and I really want to change it. Would tea be a good substitute? I have a mountain dew problem that is seriously unhealthy. :( help!