As David answers we typically say to erase a bad memory... but you can say "to wash away" a bad memory. An example: Yesterday, I ate too much chocolate trying to wash away the memories of our time together.
We also drown out memories/thoughts... I tried to drown out the memories by drinking too much soju.