Septimus returned from the war with shell-shock and had delusional thoughts and hallucinations. His mental disorder was not well diagnosed, and ultimately he killed himself rather then bear the pain of his mental disease.
septimus killed himself because this was the only way in which he could preserve his soul from being succumbed by society. he knew he couldn't find his place in the world anymore, so he commited suicide.
After war, Septimus thought he didn't fit the world anymore; that society so changed, where people were so cold towards the other's feelings, or were focused on trivialities. He had done and lost so much in war, but the world didn't seem to notice or care.
Besides that, his mental problems and the painful or totally static (resting cure) treatments disturbed him even more than madness. Suicide was a way he found to stop the pain and tell the world a truth: life means more than just living; it means adaptation to reality.