To dream that you committed a suicide, indicates the frustration and desperation you are suffering at the moment. Probably you are unable to deal with the pain and pressure at some situation or relationship, therefore you see the only one way to finish everything is get suicide. Consider that dream could also show the shame you have for something you have done. Alternatively, the dream could symbolize the end of something you are ready to finish. If you saw someone else committing the suicide, then it points to the worries you have towards that particular person. On the other hand, there could be some aspects you try to remove from yourself, but implied them in another person while dreaming.
Read more about dreaming of Suicide in other dream meanings interpretations.