The first and most effective method to dilute caffeine in your system is hydration. According to Healthline, caffeine has a half-life of 1.5 to 9.5 hours depending on the person. This means that it takes that long to get rid of half the caffeine you've consumed. During that time, you should obviously not consume more caffeine, which can be found not only in beverages like soda, tea, and coffee, but also in foods like chocolate and certain medications. Since caffeine is a diuretic, you should drink lots of water to replace the moisture you lose while also flushing the caffeine out of your system (per Right as Rain, a University of Washington Medicine publication).
If you're someone who doesn't like drinking large amounts of water, NDTV Food recommends mixing in drinks like caffeine-free chamomile or hibiscus tea, coconut water, or milk to help keep yourself adequately hydrated. Additionally, sports drinks and juices which restore electrolytes may also be helpful in maintaining hydration and counteracting some of the symptoms that might come with a caffeine overdose like nausea and diarrhea (per LIVESTRONG).