The purpose of punctuation is to add clarity to the sentence, or to remove confusion.
It is not there to indicate breathing.
The fact that it often coincides with a breath or pause is because we pause in speech t add clarity or remove confusion.
There are fairly clear rules for where commas may be put, to be modified by the generosity of the rule that says something like "if it isn't needed, don't use it" - another expression of Arrius's measles principle.
Looking at the guidance on commas in
THIS LINK (from the list at the top of this forum), I could punctuate the sentence like this:
My attempt was patently in vain, and, as I trudged away inconsolably from Southsea Common, I knew that all hope was dashed.
The first comma is a joining comma, preceding the joining word "and" and joining the red sentence with the blue sentence.
The second and third commas are bracketing commas, marking off the non-essential clause.
I think the bracketing commas make the sentence a bit "comma-heavy" so I would leave them out.
I'd keep the joining comma.