Overall, caffeine is not a good idea for hangovers primarily because it has a diuretic effect. Basically, it will dehydrate you more--this is a bad thing, as a lot of the hangover symptoms you experience are from being dehydrated. So, in essence, caffeine is likely just making the situation worse.
While caffeine is a stimulant and can transiently make you feel like you've got more energy, its effects are not long lasting. When that stimulant effect wears off, you are left feeling more tired and may even feel more wired and anxious. And while caffeine is also a vasoconstrictor of blood vessels and may help mildly with headaches associated with hangovers, the effect is transient.
My recommendation would be to drink plenty of fluid and make sure you eat calming foods that are not too fatty or fried. Make sure you are getting the minerals necessary for healthy body functioning and recovery, such as in vegetables, fruits, and nuts. Allow yourself to rest and recover.
It is also important to pay attention to what you do the hours before you drink and while you are drinking. Make sure to pace your drinks and to stay hydrated. One simple way to do that is to make sure you are alternating one alcoholic drink with another non-alcoholic drink. So if you start out with a glass of wine, let your next drink be water or sparkling water, then if you have another glass of wine, make sure to switch back to water after that, and so forth. This will help you to enjoy your night and the day after as well!