Most dream interpretation indicates that death is simply an ending to a phase and points to a re-birth or renewal of some part of the self or life. Perhaps you have put a part of yourself away or "to rest", and are beginning a new phase or have a new outlook on something about your life.
I had a dream that I was seated with everyone at a funeral and then I looked up and I was in the casket, I saw everyone that I loved say goodbye to me then I saw them barrie me.