As a reference here is the quote again with my emphasis:
I have just now come from a party where I was its life and soul; witticisms streamed from my lips, everyone laughed and admired me, but I went away — yes, the dash should be as long as the radius of the earth's orbit ——————————— and wanted to shoot myself.
Although Kierkegaard's experiences appeared to be positive they were also powerful and because of that perhaps traumatic. Such trauma may have suggested to him the thought of suicide to relieve it. He may have recorded the experience in his personal journal to remind him of this unexpected suggestion that came to his mind.
If that is the case, looking at trauma in more detail may reveal situations where it could occur even after what may be viewed by others as positive experiences. Here is a descriptions from Wikipedia on the symptoms:
After a traumatic experience, a person may re-experience the trauma mentally and physically, hence trauma reminders, also called triggers, can be uncomfortable and even painful. Re-experiencing can damage people's sense of safety, self, self-efficacy, as well as their ability to regulate emotions and navigate relationships. They may turn to psychoactive substances including alcohol to try to escape or dampen the feelings.
The thought of suicide may have been a suggestion coming to Kierkegaard's mind on how he might "dampen the feelings" to relieve the trauma.
Wikipedia contributors. (2019, September 9). Psychological trauma. In Wikipedia, The Free Encyclopedia. Retrieved 22:17, September 11, 2019, from https://en.wikipedia.org/w/index.php?title=Psychological_trauma&oldid=914716865