Bad trip

Hey guys i had edibles for the first gime ever and i think ive had a bad reaction and i accidentally took a few. does anyone have any tips to calm down and also how long will the derealization and memory loss last?