My best advice to you would be to purchase a firearm online if you can, second best option I'd know of is to run a background check on yourself, though I can't certify how much that would tell you. If your committal to an institution was involuntary it's pretty likely it will show up on a red-flag check, though I don't know the laws or gun control methods in Wisconsin.
From what I know where I live, if you have a 5150 (non-voluntary 72 hour hold) you are placed on a list that prevents you from owning or possessing a fire-arm for up to 3 years. With all that being said; I don't think just attempting to purchase a firearm after being red-flagged would send you straight back to an institution.
According to where I live to commit you again they need to prove that you are a danger to yourself or others, just attempting to purchase a firearm doesn't qualify.
I provide this advice as-is, I don't have any law background nor practice in any state. I wish you the best of luck with achieving peace in the means you choose.